Jump to content
  • Advertisement
Sign in to follow this  
gav86

SDL Linking error

This topic is 4836 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

Well I can't seem to get any programs to compile successfully in SDL at the moment (Using visual C++ 6) I always receive the following error - I'm not sure what it means but my best guess is functions in 2 different libraries with the same name are getting in the way of each other? anyway hopefully someone here has dealt with this before/knows what it means, here's the output when I go to compile... *edit* If you're wondering what the code was in this instance, it was the example from part 1 of the cornerstone SDL tutorials (Which I assume ought to work!) --------------------Configuration: TutorialIntroduction - Win32 Debug-------------------- Compiling... main.cpp Linking... msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj) msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj) msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj) msvcrt.lib(MSVCRT.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/TutorialIntroduction.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. TutorialIntroduction.exe - 5 error(s), 1 warning(s)

Share this post


Link to post
Share on other sites
Advertisement
Make sure that you're linking against the debug libraries for a debug build, and release libraries for release builds. Also your project needs to be set up under "Code Generation" for "Multithreaded DLL". I think the code-generation settings can be accessed under Project->Options. There's a drop down that enables you to display the code generation settings.

Share this post


Link to post
Share on other sites
Ah yep thats it.. .

thanks. . I wish all these stupid settings would set themselves! (and games program themselves for that matter...)

*invents a brainwave-to-machinelanguage interpreter*

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!