Scroll to navigation

al_install_system(3) al_install_system(3)

NAME

al_install_system - Allegro 5 API

SYNOPSIS

#include <allegro5/allegro.h>
bool al_install_system(int version, int (*atexit_ptr)(void (*)(void)))
    

DESCRIPTION

Initialize the Allegro system. No other Allegro functions can be called before this (with one or two exceptions).

The version field should always be set to ALLEGRO_VERSION_INT.

If atexit_ptr is non-NULL, and if hasn’t been done already, al_uninstall_system(3) will be registered as an atexit function.

Returns true if Allegro was successfully initialized by this function call (or already was initialized previously), false if Allegro cannot be used. A common reason for this function to fail is when the version of Allegro you compiled your game against is not compatible with the version of the shared libraries that were found on the system.

The version compatibility check works as follows. Let A = xa.ya.za.* be the version of Allegro you compiled with, and B = xb.yb.zb.* be the version of Allegro found in the system shared library.

If you defined ALLEGRO_UNSTABLE before including Allegro headers, then version A is compatible with B only if xa.ya.za = xb.yb.zb. Otherwise, A is compatible with B only if xa.ya = xb.yb.

SEE ALSO

al_init(3)

Allegro reference manual