在使用vc++ compile時,要先將環境變數設定好,才能正確以unicode方式顯示

步驟: 
1.[Project]->[Setting]->C/C++ 頁面中 於Preprocessor definitions設定 UNICODE 或者 _UNICODE 
(UNICODE 是定義 window header file使用 Unicode的Function,而 _UNICODE 則設定C/C++ header file使用Unicode Function) 

2.[Project]->[Setting]->Link 頁面中 在Categroy 中選擇Ouput 設定底下的Entry-Point Sysbol: 為wWinMainCRTStartup。 

如果未設定wWinMainCRTStartup則程式編譯時會出現下面訊息。 (很重要)

msvcrt.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16 

參考網站
http://tw.myblog.yahoo.com/josh-chang/article?mid=67&prev=69&next=17&l=f&fid=11
arrow
arrow
    全站熱搜

    sanhue 發表在 痞客邦 留言(0) 人氣()