Observe this close Scenario even though it appears to be the same as my previous questions. Still I am not getting an answer. So please don't report as a duplicate.
I have a project which has 10 dependencies. First I compiled using the /MTD option in the C/C++ codegeneration section in the main project and all its dependencies are getting build successfully.
Next I changed the option from /MTD to /MDd and again all dependent projects are getting 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?