Error LNK2038: "RuntimeLibrary" mismatch detected: Value "Mdd_dynamicdebug" Mismatch value "Mtd_staticdebug"

Source: Internet
Author: User

Today VS2012 C + + compilation appears with a bunch of errors:

1 1>Generating Code ...2 1>code.obj:error LNK2005:"Public : __thiscall std::_container_base12::_container_base12 (void)"(??[email protected]@@[email protected]) has been defined in Msvcprtd.lib (MSVCP110D.dll)3 1>code.obj:error LNK2005:"Public : __thiscall std::_container_base12::~_container_base12 (void)"(??[email protected]@@[email protected]) has been defined in Msvcprtd.lib (MSVCP110D.dll)4 1>code.obj:error LNK2005:"public:void __thiscall std::_container_base12::_orphan_all (void)"(?[email protected][email protected]@ @QAEXXZ) has been defined in Msvcprtd.lib (MSVCP110D.dll)5 1>Iocp_socket.lib (clog.obj): Error LNK2038: "RuntimeLibrary" mismatch detected: Value "Mdd_dynamicdebug" Mismatch value "Mtd_staticdebug" ( In Code.obj)6 1>Iocp_socket.lib (tcpserver.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj)7 1>Iocp_socket.lib (stdafx.obj): Error LNK2038: "RuntimeLibrary" mismatch detected: Value "Mdd_dynamicdebug" Mismatch value "Mtd_staticdebug" (in Code.obj)8 1>Iocp_socket.lib (tcpsrvexception.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj)9 1>Iocp_socket.lib (tcpreceivecontext.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj)Ten 1>Iocp_socket.lib (tcpsendcontext.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj) One 1>Iocp_socket.lib (acceptcontext.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj) A 1>Iocp_socket.lib (operatecontext.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj) - 1>Iocp_socket.lib (memoryblock.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj) - 1>Iocp_socket.lib (contextstack.obj): Error LNK2038: Detected "runtimelibrary" mismatch: Value "Mdd_dynamicdebug" Mismatch value "mtd_ Staticdebug "(in Code.obj) the 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"void __cdecl std::_debug_message (wchar_t const *,wchar_t Const *,unsigned int)"(?[email protected]@@[email protected]) has been defined in Libcpmtd.lib (stdthrow.obj) - 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"Public : __thiscall std::_container_base12::_container_base12 (void)"(??[email Protected]@@[email protected]) already defined in Code.obj - 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"Public : __thiscall std::_container_base12::~_container_base12 (void)"(??[email Protected]@@[email protected]) already defined in Code.obj - 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"public:void __thiscall std::_container_base12::_orphan_all (void)"(?[email protected][email protected]@ @QAEXXZ] already defined in Code.obj + 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"void __cdecl std::_xbad_alloc (void)"(?[email protected]@ @YAXXZ) has been defined in Libcpmtd.lib (xthrow.obj) - 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"void __cdecl Std::_xlength_error (char const *)"(?[email protected]@@[email protected]) has been defined in Libcpmtd.lib (xthrow.obj) + 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"void __cdecl Std::_xout_of_range (char const *)"(?[email protected]@@[email protected]) has been defined in Libcpmtd.lib (xthrow.obj) A 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"Char const * __cdecl std::_syserror_map (int)"(?[email protected]@@[email protected]) has been defined in Libcpmtd.lib (syserror.obj) at 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"Char const * __cdecl std::_winerror_map (int)"(?[email protected]@@[email protected]) has been defined in Libcpmtd.lib (syserror.obj) - 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"Public : __thiscall std::_lockit::_lockit (int)"(??[email Protected]@@[email protected]@z] has been defined in Libcpmtd.lib (xlock.obj) - 1>msvcprtd.lib (MSVCP110D.dll): Error LNK2005:"Public : __thiscall std::_lockit::~_lockit (void)"(??[email protected]@@[email protected]) has been defined in Libcpmtd.lib (xlock.obj) - 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _MemMove has been defined in LIBCMTD.lib (memmove.obj) - 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _fclose has been defined in LIBCMTD.lib (fclose.obj) - 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _fflush has been defined in LIBCMTD.lib (fflush.obj) in 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _PRINTF has been defined in LIBCMTD.lib (printf.obj) - 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _VPRINTF has been defined in LIBCMTD.lib (vprintf.obj) to 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: __vsnprintf_s has been defined in LIBCMTD.lib (vsnprnc.obj) + 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _vsprintf_s has been defined in LIBCMTD.lib (vsnprnc.obj) - 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: __invalid_parameter has been defined in LIBCMTD.lib (invarg.obj) the 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _memcpy_s has been defined in LIBCMTD.lib (memcpy_s.obj) * 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: _strncpy_s has been defined in LIBCMTD.lib (strncpy_s.obj) $ 1>msvcrtd.lib (MSVCR110D.dll): Error LNK2005:"public:virtual __thiscall std::exception::~exception (void)"(??[email protected]@@[email protected]) has been defined in LIBCMTD.lib (stdexcpt.obj)Panax Notoginseng 1>msvcrtd.lib (MSVCR110D.dll): Error LNK2005:"public:virtual Char const * __thiscall std::exception::what (void) const"(?[email protected]@[email protected] @UBEPBDXZ) has been defined in LIBCMTD.lib (stdexcpt.obj) - 1>MSVCRTD.lib (MSVCR110D.dll): Error LNK2005: __CRTDBGREPORTW has been defined in LIBCMTD.lib (dbgrptw.obj) the 1>msvcrtd.lib (ti_inst.obj): Error LNK2005:"Private: __thiscall Type_info::type_info (class Type_info const &)"(??[email Protected]@[email protected]@@z] has been defined in LIBCMTD.lib (typinfo.obj) + 1>msvcrtd.lib (ti_inst.obj): Error LNK2005:"private:class Type_info & __thiscall type_info::operator= (class Type_info const &)"(??[email Protected]@[email protected]@@z] has been defined in LIBCMTD.lib (typinfo.obj) A 1>link:warning LNK4098: Default Library "MSVCRTD" conflicts with other libraries; use/nodefaultlib:library the 1>e:\projects\c++\iocp_socket\debug\test.exe:fatal Error LNK1169: Find one or more multi-definition symbols +========== Generation: Success0One, failure1A, Latest0One, skip0A ==========

Later checked, is the problem of the run-Library setup; The runtime settings for several projects are different:

Project Properties , Configuration Properties , C + + , code generation , Runtime library

It's all set. multithreaded Debugging (/MTD)

Error LNK2038: "RuntimeLibrary" mismatch detected: Value "Mdd_dynamicdebug" Mismatch value "Mtd_staticdebug"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.