Public Group

#### Archived

This topic is now archived and is closed to further replies.

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

This topic is 5222 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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!

##### Share on other sites
This could come from having the wrong run-time library... The settings for debug/release are separate... See this HOWTO (scroll to the end)

##### Share on other sites
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?

##### Share on other sites
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?

##### Share on other sites
Perhaps you are using a static library that is linked with a debug version of the runtime?

##### Share on other sites
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]

##### Share on other sites
Did you build any of those libraries yourself or did you use the prepackaged binaries?

##### Share on other sites
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]

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
17
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631774
• Total Posts
3002295
×