Lazy Foo' Productions

Setting up SDL in Anjuta

Last Updated 6/14/11
1)Start up Anjuta and start a new project.
This will start up the application wizard.

2)Set your new project to be a generic/terminal project.

3)Hit next then make sure it's a C++ project:
Everything else with the application wizard should be self explanatory.

4)Once the application wizard is done creating your project go to the compiler and linker settings:

5)Under the libraries tab, type in:
SDL

6)Then hit add:

7)The close the window and hit yes on the prompt that pops up:

8)Paste the following code into the source file Anjuta provided for you:
#include "SDL/SDL.h" int main( int argc, char* args[] ) { //Start SDL SDL_Init( SDL_INIT_EVERYTHING ); //Quit SDL SDL_Quit(); return 0; }
9)Now save the source file and build your project. If there's no errors, you're finished. 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:
/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