errors switching from debug to release mode with .net 2k3

Started by
7 comments, last by graveyard filla 20 years ago
high, i recently tried compiling my game in release mode (it was in debug mode always) and i got some strange errors. they are linking errors that look like this:

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 LIBC.lib(typinfo.obj)
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 LIBC.lib(typinfo.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in LIBC.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in LIBC.lib(strncpy.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fopen already defined in LIBC.lib(fopen.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fgetc already defined in LIBC.lib(fgetc.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in LIBC.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _setvbuf already defined in LIBC.lib(setvbuf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in LIBC.lib(isctype.obj)
LIBC.lib(crt0init.obj) : warning LNK4098: defaultlib ''msvcrt.lib'' conflicts with use of other libs; use /NODEFAULTLIB:library
Release/Donkey PAC.exe : fatal error LNK1169: one or more multiply defined symbols found
does anyone know what this means? it looks like theres some sort of .dll called MSVCR71.dll which already has the libs involved with file i/o and strings. i tried commenting out the includes for and but that didnt help. it gave me errors about my input file streams not being defined... i tried include but that still didnt help. anyone know what this could be? also, that MSVCR71.dll looks really familier, i tried playing my game on another machine and it said i didnt have that MSVCR71.dll. i googled and i found out it was because i was compiling in debug mode. so i tried compiling it in release mode and now im having these problems. whats with this .dll? thanks for any help!
FTA, my 2D futuristic action MMORPG
Advertisement
This could come from having the wrong run-time library... The settings for debug/release are separate... See this HOWTO (scroll to the end)
hey, thanks a lot man, that fixed it. but, does anyone know why the hell i would have to link with "debug multi-threaded DLL" if i was compiling in release mode? this doesnt make sence, you know?
FTA, my 2D futuristic action MMORPG
You shouldn''t have to link to debug multithreaded. Multithreaded should do the job.
no, ive been linking with multi-threaded DLL this whole time (and compiling in debug mode). so, i switch to release mode and i get all these linking errors. so then, i switch from compiling in Multi-threaded DLL (/MD) to compiling as a multi-threaded Debug DLL (/MdD) and it works now! so, whats going on then?
FTA, my 2D futuristic action MMORPG
Perhaps you are using a static library that is linked with a debug version of the runtime?
huh? whatcha talkin bout? what lib could i be #including that would link with these MDVC.dll's (that IS what your talking about, right?). im a little confused... im just using regular C++ #includes and SDL libraries SDL_ttf, SDL_image, SDL_mixer,and of course the main ones


also, i read in the MSDN that if i link as a "multi-threaded debug dll" im going to have to include the debug version's of the MSVCR.dll's. why why why if im debuggin in release mode?

[edited by - graveyard filla on April 4, 2004 3:44:53 PM]
FTA, my 2D futuristic action MMORPG
Did you build any of those libraries yourself or did you use the prepackaged binaries?
yes, i use the pre-packaged ones. does anyone have any suggestions on things i should try? and why would it work if im compiling in release mode but linking in debug multi-threaded DLL ? (and it works if i do vice-versa, but not if i do the proper one to the proper one)


update: i just did a clean solution and got this warning

MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library


i dont understand what they mean though. anyone?


update again: i tried linking with a regular Multi-threaded DLL and it worked....... one last question while we are on the topic.. how come this whole time when i was compiling in debug mode, i was linking with "multi-threaded DLL" instead of the debug version, and it worked???

[edited by - graveyard filla on April 4, 2004 4:02:02 PM]
FTA, my 2D futuristic action MMORPG

This topic is closed to new replies.

Advertisement