ms vc6 鏈結錯誤處理
在windows xp下編譯的軟體,放到windows 2000上使用時,跳出了"無法找到動態鏈結庫msvcrtd.dll"的提示,後來還是直接將msvcrtd.dll從winxp系統目錄下copy過來使用來解決問題的。
不過在解決問題過程中,有其他意外收穫,現在記下來,說不定以後可參考一二。
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _realloc already defined in libcmt.lib(realloc.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _free already defined in libcmt.lib(free.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _malloc already defined in libcmt.lib(malloc.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _strchr already defined in libcmt.lib(strchr.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _sprintf already defined in libcmt.lib(sprintf.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _tolower already defined in libcmt.lib(tolower.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _getenv already defined in libcmt.lib(getenv.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _toupper already defined in libcmt.lib(toupper.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: __isctype already defined in libcmt.lib(isctype.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _atoi already defined in libcmt.lib(atox.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _strstr already defined in libcmt.lib(strstr.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _calloc already defined in libcmt.lib(calloc.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _strncpy already defined in libcmt.lib(strncpy.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _strncmp already defined in libcmt.lib(strncmp.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _memmove already defined in libcmt.lib(memmove.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _strtoul already defined in libcmt.lib(strtol.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _strtol already defined in libcmt.lib(strtol.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _fclose already defined in libcmt.lib(fclose.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _ungetc already defined in libcmt.lib(ungetc.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: __errno already defined in libcmt.lib(dosmap.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _sscanf already defined in libcmt.lib(sscanf.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _setlocale already defined in libcmt.lib(setlocal.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _printf already defined in libcmt.lib(printf.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _localtime already defined in libcmt.lib(localtim.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _time already defined in libcmt.lib(time.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: _fflush already defined in libcmt.lib(fflush.obj)
msvcrtd.lib(msvcrtd.dll) : error lnk2005: __strdup already defined in libcmt.lib(strdup.obj)
link : warning lnk4098: defaultlib "msvcrtd" conflicts with use of other libs; use /nodefaultlib:library
..\..\output\release/firewallman.exe : fatal error lnk1169: one or more multiply defined symbols found
error executing link.exe.
相信乙個善良的人對上面的錯誤不會熟視無睹的,我的解決方法當然是對症下藥:
link->category: input->ignore libraries:libcmt
linking...
..\..\output\release/firewallman.exe : fatal error lnk1120: 3 unresolved externals
error executing link.exe.
後來嘗試了很多方法,經過摸索,最後得出解決方法:
在preprocessor中定義_afxdll
就這樣改:
c/c++->code generation->multithread dll (即實現/md選項)
adt編譯和candle編譯錯誤解決
錯誤一 adt編譯報錯 could not generate timestamp software caused connection abort recv failed 分析 無法生成時間戳,預設的時間戳伺服器失效,重新指定乙個即可。解決方法 命令列增加引數 tsa 感謝此時間戳伺服器 分析 此錯...
android 編譯STL模組相關錯誤解決
由於android系統目前沒有將boost加入,這裡面使用了大量的stl及c 的一些語言特性,導致編譯出現令人非常頭痛的問題。1 出現類似的異常函式錯誤 boost exception detail exception ptr.hpp 382 error expected before catch ...
《VC 深入詳解》 9 6 2錯誤 解決辦法
在 vc 深入詳解中 在狀態列的窗格中建立進度欄中,新增自定義的訊息響應函式 書中在mainfream.h中新增 afx msg void onprogress 在maiinfream.cpp中新增 on message um progress,onprogress 並新增訊息響應函式 void c...