Ubuntu 12.04 doesn't support SDL2.0
from "box" so here is a short instruction what to do, if you faced the same problem as me.
We will install SDL2.0
from sources.
First of all we need to install dependencies (same as for SDL1.2
) and mercurial
:
$ sudo apt-get build-dep libsdl1.2-dev
$ sudo apt-get install mercurial
NOTE: build-dep
will install only dependencies for libsdl1.2-dev
, not the whole lib.
Now we need to get the latest version of libsdl2.0
:
$ mkdir sdl_lib && cd sdl_lib
$ hg clone https://hg.libsdl.org/SDL
Compile and install:
$ cd SDL
$ mkdir build && cd build
$ ../configure
$ make
$ sudo make install
Now you can use SDL2.0 at your Ubuntu 12.04. Enjoy! ;)
I've got another problem:
error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
I've found all SDL
like libs
find /usr/ /usr/local/ /lib/ /etc/ /lib32/ /lib64/ -name *SDL*.so*
I've got:
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.3
/usr/local/lib/libSDL2-2.0.so.0
/usr/local/lib/libSDL2-2.0.so.0.4.0
/usr/local/lib/libSDL2.so
/usr/local/lib/libSDL2-2.0.so.0
/usr/local/lib/libSDL2-2.0.so.0.4.0
/usr/local/lib/libSDL2.so
So libs are in usr/local/lib
dirs. Just add that path to LD_LIBRARY_PATH
solve the problem:
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib