SDL (Simple DirectMedia Layer) - Getting started in Linux
This page or section is an undeveloped draft or outline. You can help to develop the work, or you can ask for assistance in the project room. |
Install the development libraries of SDL from the official repositories of your Linux distribution.
Terminal
edit$ gcc sdl.c -o sdl -lSDL2
The argument -lSDL2
means after compiling sdl.c
with gcc
, the binary sdl
, named using the -o
argument, is linked to the SDL 2 runtime libraries.
NOTE: Linking the binary to SDL 1.2 libraries requires the -lSDL
argument.
To continue using the terminal to build your source, you can use GNU Make, CMake or a plain Makefile.
Code::Blocks
edit