Sign in to follow this  
ICUP

SDL and Vector = Bad Couple

Recommended Posts

ICUP    140
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
fpsgamer    856
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
ICUP    140
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
sheep19    494
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
Sean_Seanston    880
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this