SDL: Linkers and Libraries

Started by
28 comments, last by orcfan32 18 years, 8 months ago
What are the linker parameters, and what files are needed for the libraries?
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
Advertisement
look it up on google i have a file thats says it but im at somebodys house so i dont have it with me.
Libraries are sdlmain.lib and sdl.lib.
-- unless you're using a GCC variant such as Dev-C++, MinGW32, etc, in which case the libraries are libsdl.a and libsdlmain.a and the linker parameters are -lsdl and -lsdlmain
{[JohnE, Chief Architect and Senior Programmer, Twilight Dragon Media{[+++{GCC/MinGW}+++{Code::Blocks IDE}+++{wxWidgets Cross-Platform Native UI Framework}+++
Not only that, but when I include SDL.h, it says that it doesn't exist. I checked the include\SDL directory and yes, it is there.
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
What exactly do you type to include it? Try "SDL\SDL.h", <SDL.H>, <SDL\SDL.H>, etc. It depends on your platform and compiler as to what will work.
similar to last post i have dev c++ too instead of typing

#include <SDL\SDL>

type #include <SDL\SDL>

add SDL
to everything else to
Quote:Original post by orcfan32
Not only that, but when I include SDL.h, it says that it doesn't exist. I checked the include\SDL directory and yes, it is there.



Did you set the include directory where your compilator has to use the file?

In VS.net it's look like that.

tool - Option. Project - VC++ Directories. In the include files add the include directory of SDL and do the same in the library files with the library folder of SDL.
Ok, and now it says,
  cannot find -lSDLmain 
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
What compiler are you using?

This topic is closed to new replies.

Advertisement