mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
ybbqy 2003-09-28 10:00:23 mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
我在setting|link|input "ignore libraries:", add in...
mfcs42.lib MSVCRT.lib
编译过去,但不知道为什么会出现这个问题,是我编程序的问题吗?
英文不太好,所以照作了,但不明白其意。请指点一二。
mfcs42.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)
mfcs42.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj); second definition ignored
Release/xxx.dll : fatal error LNK1169: one or more multiply defined symbols found
ANS: -Oct2002- to eliminate this linker bug, you need to force the linker to link with different .lib files in a specific order.. first mfcxxx.dll then msvcrtxxx.lib. Note the linker output error message and replace xxx with your version of .lib files.
for example for my "release build":
under setting|link|input "ignore libraries:", add in...
mfcs42.lib MSVCRT.lib
then re-add them under "object/library modules" in this exact order (mfc to be linked first).
mfcs42.lib MSVCRT.lib