Updated: November 2014
In this tutorial you're going to install SDL2 from your repositories and finally run a test. This is the easiest way. You only have to search and install the packages using the package manager. Obviously, you will not have the latest version and fixes, but it's enough if you're starting with SDL2. If you need to install the latest version compiling the source code or you have any problem with this tutorial, go to this forum: http://www. Install the following packages using apt, apt-get or aptitude build-essential Testing SDL2 Now you're a going to test SDL2 with a simple code Go to your user home directory, you can use cd or cd ~ cd ~ Create a new directory for your SDL2 projects and one for this test mkdir -p SDL2projects/SDL2test Go to SDL2test directory cd SDL2projects/SDL2test Download the following image and the source code file wget http:///files/0002/sdl.bmp Compile the file main.c with the command gcc main.c -o test -Wall -lSDL2 Run the program ./test Enjoy it |
|