Using SDL in Debian Linux
Update the repository list and install SDL using apt.
apt-get update && apt-get install libsdl1.2-dev
For other sub libraries (optional) I used the command “apt-cache search sdl” to get the name of the rest of the dev packages. For example libsdlimage-dev or libsdlnet-dev.
Compile SDL application in g++
When I compiled my SDL_net application in Linux, this worked like a charm.
g++ -o appname file.cpp -lSDLmain -lSDL_net
[...] Install SDL for GNU/Linux Use your package manager and install the development libraries for SDL. For Debian based systems, i’ve posted an article about how to install SDL here. [...]