Public Group

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

## Recommended Posts

I tried to do some network support in my sdl game project. To see if I could it to just work, I tried to compile the example source on this site. Obviously, I couldnt get it to work. I get the following output:
------ Build started: Project: SDL_Net, Configuration: Debug Win32 ------

msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fprintf already defined in LIBCD.lib(fprintf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/SDL_Net.exe : fatal error LNK1169: one or more multiply defined symbols found


Ive searched around and apparently, that error is given when I link libraries in the wrong order, the MFC library often cause this error according to my reading. However, the only libraries I include are sdl.lib sdlmain.lib sdl_net.lib. Anyone know what I should do?

##### Share on other sites
Try changing the code generation options in your project to use the multithreaded DLL version of the C runtime library.

##### Share on other sites
Thanks that solved it.

• 23
• 10
• 19
• 15
• 14