Installing SDL2 on Linux
05 Jan 2014Introduction
SDL2 was released a little while ago, but still hasn’t made it into the stable repositories of some Linux distributions. After doing a big of digging, it’s not too hard to get this installed yourself - most of the advice offered in this post comes from an answer on the Ubuntu forums here.
In today’s post, we’ll install SDL2 on a Debian/Ubuntu style distribution from source.
Dependencies
First thing before we download and compile the SDL2 source is to get some of the dependencies installed on your system. The following install line will put all of the libraries that SDL2 requires:
Once all of these have installed successfully, you’ll need to download a copy of the source. All downloads can be found here. This guide will assume that you’ll download the .tar.gz source archive.
Compilation and Installation
Extract the package into a directory under your home directory, somewhere . . .
Next we’ll configure, build and install the libraries.
Once compilation and installation have complete, you’ll need to update your library links/cache. Do this with the following command:
That’s all there is to it.