|
|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤. c9 {) G4 m; F% m' f1 e
. e. b8 a" r1 h" A8 Z 1、新建一个工程;# P; T2 d. t7 X' ^: ~; M! l' {& r! k
2、选择“Build->Configurations”菜单! e( q/ i# N6 W! U! ^" y$ c3 A3 m# M
3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置
; ~! ^9 b" y8 S( L+ Z 添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”- d$ ^- E3 K* T( ~5 R8 n/ K
4、选择“Project->Setting”菜单- M2 H# Z0 D' Y- R- p% a' F( L
5、切换到“General ”TAB页% l- V4 X$ }# T& x) i: b7 q" b
6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU " ~$ W+ Q7 y# E) ~- Z, t
7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU 2 U5 k* ]; ? Z8 g
8、切换到“C++ ” Tab页+ V) W8 |5 |2 n$ k; S+ W; g7 c
9、从下拉列表框中选择“Preprocessor”' r7 X: i' `+ e' P( f: y
10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|