|
|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤
. q" t. R2 W2 L, |9 d# V$ h % X% L: M/ {6 s: B/ E# j
1、新建一个工程; P+ B! i$ J c5 P& ]2 i
2、选择“Build->Configurations”菜单
& ?2 L2 t8 }' @1 V' ?: ] 3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置
/ B% O5 U4 V1 Z }, n7 q 添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”9 Z. D2 K I- X3 l- g0 ^$ M
4、选择“Project->Setting”菜单
6 n" D, g# X" p y* w 5、切换到“General ”TAB页
; o1 ^, Y9 Q( ^5 b+ t3 a 6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU , F8 q" g; \1 I' ]
7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU $ K" q. K2 S, g# B4 e3 S+ X
8、切换到“C++ ” Tab页0 D3 G+ r6 Z3 i( P y- k+ p3 G: {
9、从下拉列表框中选择“Preprocessor”
r F/ _6 w% ~$ @' a! S, u2 X 10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|