Posted on 2010-08-02 14:14
S.l.e!ep.¢% 閱讀(571)
評論(0) 編輯 收藏 引用 所屬分類:
VC
WTL工程編譯 Debug 無問題,編譯 Release時出現 Link?錯誤
1>正在鏈接...
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __get_osplatform 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __osplatform 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(calloc.obj) : error LNK2005: _calloc 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(dosmap.obj) : error LNK2005: __errno 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(dosmap.obj) : error LNK2005: __set_errno 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(dosmap.obj) : error LNK2005: __get_errno 已經在 atlmincrt.lib(atlinit.obj) 中定義
1>LIBCMT.lib(crt0.obj) : error LNK2019: 無法解析的外部符號 _main,該符號在函數 ___tmainCRTStartup 中被引用
1>Release\KugouUIDemo.exe : fatal error LNK1120: 1 個無法解析的外部命令
解決方法:
屬性頁 -> 配置屬性 -> 常規 -> 項目默認值 -> 在ATL中最小使用CRT -> 否