Lazy Foo' Productions

Setting up SDL in Eclipse

Last Updated 6/14/11
1)Start a new managed make project:

2)After you've named your project and everything go to project properties:

3)Go to the C/C++ Build menu, then the Libraries submenu. In the Libraries submenu click add.

4)Then paste
and click ok.

5)Add a new source file to your project and paste the following code into it:
#include "SDL/SDL.h" int main( int argc, char* args[] ) { //Start SDL SDL_Init( SDL_INIT_EVERYTHING ); //Quit SDL SDL_Quit(); return 0; }
6)Now save and compile your project. If it compiles you're done. Otherwise go back and make sure you didn't skip a step.
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:

Bookmark it and keep it handy for reference.

Tutorial Index Part 2: Getting an Image on the Screen