日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

msvcrt.lib和LIBCD.lib链接冲突

發布時間:2023/11/27 生活经验 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 msvcrt.lib和LIBCD.lib链接冲突 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

今天在移植一個開源代碼到windows的VC6工程,編譯時出現了這些奇怪的LINK錯誤。

++++++++++++++++++++++++

msvcrt.lib(MSVCRT.dll) : error LNK2005: _toupper already defined in LIBCD.lib(toupper.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _tolower already defined in LIBCD.lib(tolower.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isupper already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isalpha already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _atol already defined in LIBCD.lib(atox.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _wcslen already defined in LIBCD.lib(wcslen.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __strdup already defined in LIBCD.lib(strdup.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in LIBCD.lib(memmove.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strrchr already defined in LIBCD.lib(strrchr.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isspace already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in LIBCD.lib(strchr.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isalnum already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isdigit already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isxdigit already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncmp already defined in LIBCD.lib(strncmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _localeconv already defined in LIBCD.lib(lconv.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _floor already defined in LIBCD.lib(floor.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in LIBCD.lib(stricmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _getenv already defined in LIBCD.lib(getenv.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBCD.lib(atox.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _atof already defined in LIBCD.lib(atof.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strcspn already defined in LIBCD.lib(strcspn.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fwrite already defined in LIBCD.lib(fwrite.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fputc already defined in LIBCD.lib(fputc.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strtol already defined in LIBCD.lib(strtol.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __strnicmp already defined in LIBCD.lib(strnicmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strstr already defined in LIBCD.lib(strstr.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isprint already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strtod already defined in LIBCD.lib(strtod.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fopen already defined in LIBCD.lib(fopen.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in LIBCD.lib(fflush.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _abort already defined in LIBCD.lib(abort.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _islower already defined in LIBCD.lib(_ctype.obj)

++++++++++++++++++++++++

從提示來看,msvcrt.lib(MSVCRT.dll)和LIBCD.lib中存在符號沖突!

導致鏈接器在鏈接時發現一個符號在兩處有定義,就不知道該鏈接那個了,從而報出LNK2005的鏈接錯誤。

在工程設置中勾上"Force?file output"即可強制生成dll或exe文件。

?

關于這個選項的更多說明請參考:http://msdn.microsoft.com/en-us/library/70abkas3.aspx

轉載于:https://www.cnblogs.com/kekec/archive/2011/11/18/2253879.html

總結

以上是生活随笔為你收集整理的msvcrt.lib和LIBCD.lib链接冲突的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。