|
|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤 T/ O: j: j! M- A7 T7 _) F8 ?6 ~' O
- F' ]- h: |' } 1、新建一个工程;
* P% c( z5 H- K/ S) ?2 R 2、选择“Build->Configurations”菜单
Z: |+ g9 _* J4 d 3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置
3 h# a! R; }0 x 添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”9 M: {4 Y2 j8 }1 O8 a+ I# e8 l/ x5 L
4、选择“Project->Setting”菜单
* a! t7 d: T2 b! y0 Y 5、切换到“General ”TAB页
/ C W; r1 d( |% [6 { m; t 6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU : W W* O) f/ ]' B7 @
7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU ; W7 h& D2 m0 E1 Y4 {# u
8、切换到“C++ ” Tab页 b# l; F* u, l1 ^' I V
9、从下拉列表框中选择“Preprocessor”
8 k" [: I# h' I4 I$ P$ Z' |/ A 10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|