|
通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤
7 c# I% Z5 k5 y( D# a" V% ~
+ B0 @4 Z P# ?, f h; R 1、新建一个工程;
/ h5 ^" B4 i+ P* f+ N 2、选择“Build->Configurations”菜单
% e" d7 ^* f6 _. s. o! e! } 3、点击“Add”按钮,添加“Unicode Debug”-拷贝“win32 Debug”配置
+ M, l4 Y4 f7 E1 s( n8 l 添加“Unicode Release”-拷贝“win32 Release”配置 ,然后点击“OK”
# A* `1 ^% @1 \2 x9 E 4、选择“Project->Setting”菜单7 Q8 S& @! e: e" y7 T
5、切换到“General ”TAB页
, o0 d7 r) Z9 P9 r$ S# C. | 6、修改“Win32 Unicode Debug”的Intermediate Files和Output Files为DebugU ' _5 |: @) z' b" M# _% w3 Z
7、修改“Win32 Unicode Release”的Intermediate Files和Output Files为ReleaseU & s( O0 w6 A- @
8、切换到“C++ ” Tab页% {) G" }0 L* Q4 h2 V7 T; Q2 A
9、从下拉列表框中选择“Preprocessor”
7 m6 q: t/ d) u) k% @2 ~! n 10、为“Win32 Unicode Debug”和“Win32 Unicode Release”分别添加_UNICODE和UNICODE variables |
|