1al_install_system(3) al_install_system(3)
2
3
4
6 al_install_system - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 bool al_install_system(int version, int (*atexit_ptr)(void (*)(void)))
12
14 Initialize the Allegro system. No other Allegro functions can be
15 called before this (with one or two exceptions).
16
17 The version field should always be set to ALLEGRO_VERSION_INT.
18
19 If atexit_ptr is non-NULL, and if hasn’t been done already, al_unin‐
20 stall_system(3) will be registered as an atexit function.
21
22 Returns true if Allegro was successfully initialized by this function
23 call (or already was initialized previously), false if Allegro cannot
24 be used. A common reason for this function to fail is when the version
25 of Allegro you compiled your game against is not compatible with the
26 version of the shared libraries that were found on the system.
27
28 The version compatibility check works as follows. Let A = xa.ya.za.*
29 be the version of Allegro you compiled with, and B = xb.yb.zb.* be the
30 version of Allegro found in the system shared library.
31
32 If you defined ALLEGRO_UNSTABLE before including Allegro headers, then
33 version A is compatible with B only if xa.ya.za = xb.yb.zb. Otherwise,
34 A is compatible with B only if xa.ya = xb.yb.
35
37 al_init(3)
38
39
40
41Allegro reference manual al_install_system(3)