1
General / [Fixed] Visual C++ - Linking error with /MT option.
« on: April 21, 2010, 12:39:22 pm »
Hi, there. I'm using SFML 2.0 (rev. 1516) and Visual Studio 2008.
Before I use this, rev 1516, there is no error to compile.
Yes, this is the problem "/MT" and "/MD" option to link.
But in the past, compiled with no error.
And I was found what extra library has changed to static library.
I think png.lib or jpeg.lib compiled with "/MD" option.
If this is correct, I don't want to use "/MD" option because it needs MFC DLL.
Is there another solution in this case?
FIX: not MFC DLL, it needs MSVCR90.dll.
Before I use this, rev 1516, there is no error to compile.
Code: [Select]
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _ferror already defined in LIBCMTD.lib(feoferr.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _longjmp already defined in LIBCMTD.lib(longjmp.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
Yes, this is the problem "/MT" and "/MD" option to link.
But in the past, compiled with no error.
And I was found what extra library has changed to static library.
I think png.lib or jpeg.lib compiled with "/MD" option.
If this is correct, I don't want to use "/MD" option because it needs MFC DLL.
Is there another solution in this case?
FIX: not MFC DLL, it needs MSVCR90.dll.