Jump to content
  • Advertisement
Sign in to follow this  
Mizipzor

Linker error 2005

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

If you intended to correct an error in the post then please contact us.

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 ------

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?

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!