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

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”...

發(fā)布時間:2023/12/10 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”... 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

今日VS2012 C++編譯出現(xiàn)一堆錯誤:

1 1> 正在生成代碼... 2 1>Code.obj : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) 已經(jīng)在 msvcprtd.lib(MSVCP110D.dll) 中定義 3 1>Code.obj : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) 已經(jīng)在 msvcprtd.lib(MSVCP110D.dll) 中定義 4 1>Code.obj : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) 已經(jīng)在 msvcprtd.lib(MSVCP110D.dll) 中定義 5 1>IOCP_Socket.lib(CLog.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 6 1>IOCP_Socket.lib(TcpServer.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 7 1>IOCP_Socket.lib(stdafx.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 8 1>IOCP_Socket.lib(TcpSrvException.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 9 1>IOCP_Socket.lib(TcpReceiveContext.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 10 1>IOCP_Socket.lib(TcpSendContext.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 11 1>IOCP_Socket.lib(AcceptContext.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 12 1>IOCP_Socket.lib(OperateContext.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 13 1>IOCP_Socket.lib(MemoryBlock.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 14 1>IOCP_Socket.lib(ContextStack.obj) : error LNK2038: 檢測到“RuntimeLibrary”的不匹配項: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”(Code.obj 中) 15 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) 已經(jīng)在 libcpmtd.lib(stdthrow.obj) 中定義 16 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) 已經(jīng)在 Code.obj 中定義 17 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) 已經(jīng)在 Code.obj 中定義 18 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) 已經(jīng)在 Code.obj 中定義 19 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) 已經(jīng)在 libcpmtd.lib(xthrow.obj) 中定義 20 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) 已經(jīng)在 libcpmtd.lib(xthrow.obj) 中定義 21 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) 已經(jīng)在 libcpmtd.lib(xthrow.obj) 中定義 22 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "char const * __cdecl std::_Syserror_map(int)" (?_Syserror_map@std@@YAPBDH@Z) 已經(jīng)在 libcpmtd.lib(syserror.obj) 中定義 23 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "char const * __cdecl std::_Winerror_map(int)" (?_Winerror_map@std@@YAPBDH@Z) 已經(jīng)在 libcpmtd.lib(syserror.obj) 中定義 24 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) 已經(jīng)在 libcpmtd.lib(xlock.obj) 中定義 25 1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) 已經(jīng)在 libcpmtd.lib(xlock.obj) 中定義 26 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memmove 已經(jīng)在 LIBCMTD.lib(memmove.obj) 中定義 27 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fclose 已經(jīng)在 LIBCMTD.lib(fclose.obj) 中定義 28 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fflush 已經(jīng)在 LIBCMTD.lib(fflush.obj) 中定義 29 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _printf 已經(jīng)在 LIBCMTD.lib(printf.obj) 中定義 30 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _vprintf 已經(jīng)在 LIBCMTD.lib(vprintf.obj) 中定義 31 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __vsnprintf_s 已經(jīng)在 LIBCMTD.lib(vsnprnc.obj) 中定義 32 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _vsprintf_s 已經(jīng)在 LIBCMTD.lib(vsnprnc.obj) 中定義 33 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __invalid_parameter 已經(jīng)在 LIBCMTD.lib(invarg.obj) 中定義 34 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memcpy_s 已經(jīng)在 LIBCMTD.lib(memcpy_s.obj) 中定義 35 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strncpy_s 已經(jīng)在 LIBCMTD.lib(strncpy_s.obj) 中定義 36 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) 已經(jīng)在 LIBCMTD.lib(stdexcpt.obj) 中定義 37 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) 已經(jīng)在 LIBCMTD.lib(stdexcpt.obj) 中定義 38 1>MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __CrtDbgReportW 已經(jīng)在 LIBCMTD.lib(dbgrptw.obj) 中定義 39 1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) 已經(jīng)在 LIBCMTD.lib(typinfo.obj) 中定義 40 1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) 已經(jīng)在 LIBCMTD.lib(typinfo.obj) 中定義 41 1>LINK : warning LNK4098: 默認庫“MSVCRTD”與其他庫的使用沖突;請使用 /NODEFAULTLIB:library 42 1>E:\Projects\C++\IOCP_Socket\Debug\Test.exe : fatal error LNK1169: 找到一個或多個多重定義的符號 43 ========== 生成: 成功 0 個,失敗 1 個,最新 0 個,跳過 0 個 ==========

后來查了下,是運行庫設(shè)置的問題; 幾個工程的 運行庫設(shè)置不一樣了:

項目屬性 -> 配置屬性 -> C/C++ -> 代碼生成 -> 運行庫

都設(shè)置一樣就行了 多線程調(diào)試(/MTd)

轉(zhuǎn)載于:https://www.cnblogs.com/lzpong/p/4631784.html

總結(jié)

以上是生活随笔為你收集整理的error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“MTd_StaticDebug”...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。