#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 42. Multimedia Libraries and Drivers

- Prev

  SBC-2.0

- Next

  SDL2-2.30.11

- Up
- Home

# sdl12-compat-1.2.68

## 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.3 platform.

### Package Information

- Download (HTTP): https://github.com/libsdl-org/sdl12-compat/archive/release-1.2.68/sdl12-compat-release-1.2.68.tar.gz

- Download MD5 sum: 04ed17494dad2131b37e0300f8af31ec

- Download size: 452 KB

- Estimated disk space required: 7.1 MB

- Estimated build time: less than 0.1 SBU

### SDL Dependencies

#### Required

CMake-3.31.5, GLU-9.0.3, and SDL2-2.30.11

## Installation of sdl12-compat

Install sdl12-compat by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr \
          -D CMAKE_BUILD_TYPE=RELEASE  \
          ..  &&
    make

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.

## Contents

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

### Short Descriptions

sdl-config | determines the compile and linker flags that should be used to compile and link programs that use `libSDL`
`libSDL.so` | contains functions that provide compatibility links to SDL2 low level functions for audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and the 2D frame buffer across multiple platforms

- Prev

  SBC-2.0

- Next

  SDL2-2.30.11

- Up
- Home