|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤
: o8 S: H5 A6 Z$ r; V5 h ; f, p& N5 X) P! L# |- Y5 v
1、新建一个工程;" Z4 j: _& M8 n% o
2、选择“Build->Configurations”菜单
" @" z$ T7 N6 N! v 3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置7 a6 N" K: n" N; d
添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”
& c) k3 X) X! \: U' e$ D 4、选择“Project->Setting”菜单& `7 e5 e3 S, b0 Q
5、切换到“General ”TAB页
1 [- l7 |% f! l+ s+ `7 }# J9 n7 u 6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU
7 s& B" k; _/ N9 G: [- X, M7 E 7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU 1 ]' E1 Q- x$ k3 M
8、切换到“C++ ” Tab页
8 I9 v8 v$ y9 o& A/ X 9、从下拉列表框中选择“Preprocessor”1 \( e+ H/ p8 J4 a# [: y0 [- n
10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|