|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤' Q' _2 h/ r A% m+ w
3 j. |! I! U a2 Y0 f; P
1、新建一个工程;
7 J( x2 M$ X- [% Z- R$ a- p 2、选择“Build->Configurations”菜单( V+ j, _9 r4 t% T' q% H
3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置
+ | R/ \7 I5 q 添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”) K4 ]1 f1 d3 [3 B2 l% |
4、选择“Project->Setting”菜单
7 s% E1 ~1 x3 m8 ` _ |" i 5、切换到“General ”TAB页' J& d8 N2 R1 O. L
6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU
3 M$ x* J$ Z* o) Y 7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU
1 a* d' @9 y. C' M$ ] 8、切换到“C++ ” Tab页; W& |/ b1 ]7 ^
9、从下拉列表框中选择“Preprocessor”! Y& U% @9 u) b# v
10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|