Introduction to sdl12-compat

The Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multimedia software, such as games and emulators. This code is a compatibility layer; it provides a binary and source compatible API for programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.

This package is known to build and work properly using an LFS 12.1 platform.

Package Information

SDL Dependencies


CMake-3.28.3, GLU-9.0.3, and SDL2-2.30.0

Installation of sdl12-compat

Install sdl12-compat by running the following commands:

mkdir build &&
cd    build &&

      ..  &&

Now, as the root user:

make install &&
rm -vf /usr/lib/libSDLmain.a

Testing SDL

If you wish, test the sdlcompat package using the included test programs. It is not required to install any of the resulting binaries to validate the installation.

You'll need to manually run all the test programs (they are listed in the README file in this directory). Many of them will need to be manually killed, and you'll need to turn your speakers on with the volume at a suitable level.


Installed Program: sdl-config
Installed Libraries:
Installed Directories: /usr/include/SDL

Short Descriptions


determines the compile and linker flags that should be used to compile and link programs that use libSDL

contains functions that provide compatibility links to SDL2 low level functions for audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D frame buffer across multiple platforms