Provided by: allegro5-doc_22.214.171.124-3_all
al_install_system - Allegro 5 API
#include <allegro5/allegro.h> bool al_install_system(int version, int (*atexit_ptr)(void (*)(void)))
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(3alleg5) 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.