通過使用unicode編譯,軟件可以適應多種情況,如何在自己的工程中添加這兩種編譯方式呢?下面是一個簡單的步驟
1、新建一個工程;
2、選擇"Build->Configurations"菜單
3、點擊"Add"按鈕,添加"Unicode Debug"-拷貝"win32 Debug"配置
添加"Unicode Release"-拷貝"win32 Release"配置 ,然後點擊"OK"
4、選擇"Project->Setting"菜單
5、切換到"General "TAB頁
6、修改 "Win32 Unicode Debug" 的 Intermediate Files 和 Output Files 爲DebugU
7、修改 "Win32 Unicode Release" 的 Intermediate Files 和 Output Files 爲ReleaseU
8、切換到"C++ " Tab頁
9、從下拉列表框中選擇 "Preprocessor"
10、爲 "Win32 Unicode Debug" 和 "Win32 Unicode Release" 分別添加_UNICODE 和 UNICODE variables
11、還要在link中,Category選output,將Entry-Point Symbol設爲wWinMainCRTStartup (控制檯程序似乎不必修改)
轉自:http://www.cncfan.com/cncfan_com_article.asp?art_id=7681&cat_id=71