Installing SDL2 on Linux Installing SDL2 on Linux linux linux

Installing SDL2 on Linux


It depends which Ubuntu version you are running but yes, there is a libsdl2 package for Ubuntu: http://packages.ubuntu.com/search?keywords=sdl2

The package you want is called libsdl2-dev.

Also, about the #include <SDL/SDL.h> line, it seems the recommended way doing it is by adjusting your compiler flags to add SDL's include pah and use #include "SDL.h". See https://forums.libsdl.org/viewtopic.php?t=5997 for more details on that.