Jump to content
  • Advertisement
Sign in to follow this  
ICUP

SDL and Vector = Bad Couple

This topic is 3712 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've done a search on linker problems with SDL and the use of vectors. Something about the release runtime libraries being different from the debug. I read one solution is to compile SDL on one's own. If I remove the _DEBUG preprocessor directive the linker errors go away, but I don't want to lose _DEBUG (Honestly, I have no idea what that does, but I'm sure it's important) So, I downloaded the SDL source files. Looked inside and find that there's hundreds of files. Supposedly the one I need to compile is SDLmain. How do I compile all these files?

Share this post


Link to post
Share on other sites
Advertisement
What tools are you using?

If you're using Visual Studio, creating a project file is a start.

If you have a GNU tool chain available (eg. Make, gcc etc), look for a configure and/or makefile.

Share this post


Link to post
Share on other sites
WindowsXP, MSVC++ 9.0

There are several folders and files and more zip files within the zipped source files. Is Visual CE the right one? It asks me about a conversion whenever I try to open any of the files inside (none of them which are source files).

Share this post


Link to post
Share on other sites
In the linker -> input -> add OpenGL32.lib as well as the other SDL libs.

e.g: SDL.lib SDLmain.lib OpenGL32.lib SDL_image.lib SDL_ttf.lib

Share this post


Link to post
Share on other sites
Ya, I had a problem where vectors wouldn't work in my current project even though I seemed to be doing them the exact same way as in an earlier project where it worked fine.

Turned out, I had a different Run-Time Library set. I put it to Multi-threaded Debug DLL (/MDd) and it worked fine.

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!