Linker error 2005

Started by
1 comment, last by Mizipzor 18 years, 3 months ago
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 ------

Linking...
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?
Advertisement
Try changing the code generation options in your project to use the multithreaded DLL version of the C runtime library.
Thanks that solved it.

This topic is closed to new replies.

Advertisement