|
|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤
' U) ~$ y; W$ f( |9 j
3 q3 i, a+ V) \- O3 t 1、新建一个工程;: x! B' o! P# W: H
2、选择“Build->Configurations”菜单* A5 x; S1 G0 q0 x2 ^0 V
3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置
- J3 C/ V% Q* }; n3 J6 v' x4 t 添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”
" D! e) s% C, A" C% h 4、选择“Project->Setting”菜单
) p+ d4 U1 p, G2 x3 q 5、切换到“General ”TAB页
2 ?+ L# q" c2 e/ ]+ q/ P 6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU , n% A* C* P' \) e/ L( n
7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU
, ^9 L4 o9 ^- ^+ p- I9 j2 I _+ U. T( k 8、切换到“C++ ” Tab页
0 Y3 C E& ~. _* X9 Q9 Y 9、从下拉列表框中选择“Preprocessor”
9 V9 z" j; t) B 10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|