Follow this close scenario, although it seems to coincide with my previous questions. However, I do not receive a response. Therefore, please do not report as duplicate.
I have a project that has 10 dependencies. First I compiled using the / MTD option in the C / C ++ cogeneration section in the main project, and all its dependencies are successfully compiled.
Then I changed the option from / MTD to / MDd and again all dependent projects get build successfully. But for the main project, the following errors are reported:
LIBCMTD.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in MSVCRTD.lib(MSVCR80D.dll) LIBCMTD.lib(lseeki64.obj) : error LNK2005: __lseeki64 already defined in MSVCRTD.lib(MSVCR80D.dll) sqlite3x.lib(sqlite3x_command.obj) : error LNK2005: "protected: wchar_t * __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::_Myptr(void)" ( ?_Myptr@ ?$basic_string@ _WU?$char_traits@ _W@std @@ V?$allocator@ _W@2 @@ std@ @IAEPA_WXZ) already defined in msvcprtd.lib(MSVCP80D.dll) MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __mkdir already defined in LIBCMTD.lib(mkdir.obj) MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __strdup already defined in LIBCMTD.lib(strdup.obj) Creating library Debug/Application.lib and object Debug/Application.exp LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
How can i fix this?
source share