Lazy Foo' Productions

Now celebrating Lazy Foo' Productions' 10dec year anniversary!

Setting up SDL for g++

Last Updated 6/14/11
1)Create a source file with the following code:
#include "SDL/SDL.h" int main( int argc, char* args[] ) { //Start SDL SDL_Init( SDL_INIT_EVERYTHING ); //Quit SDL SDL_Quit(); return 0; }
2)Then type at the command line:
g++ -o myprogram mysource.cpp -lSDL
and you're done.
The RPM also installed the SDL documentation on your computer.

It should be at usr/doc/SDL-devel-1.2.9/index.html,
usr/doc/SDL-devel-1.2.10/index.html if you're using SDL 1.2.10,
usr/doc/SDL-devel-1.2.11/index.html if you're using SDL 1.2.11, etc, etc.

Under some linux distributions, it will be located at:
/usr/share/doc/libsdl1.2-dev/docs/index.html
/usr/share/doc/libsdl1.2-dev/docs/html/index.html

Bookmark it and keep it handy for reference.

Tutorial Index Part 2: Getting an Image on the Screen