Udało mi się zrobić wszystko poprawnie jak napisano w tym poradniku http://szyx.cba.pl/index.php/allegro5-instalacja-i-konfiguracja-biblioteki-pod-codeblocks
Kompilacja przykładowego programu przechodzi pomyslnie, ale jak kompiluje program:
void init() {
int depth, res;
allegro_init();
depth = desktop_color_depth();
if( depth == 0 ) depth = 32;
set_color_depth( depth );
res = set_gfx_mode( GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0 );
if( res != 0 ) {
allegro_message( allegro_error );
exit( - 1 );
}
install_timer();
install_keyboard();
install_mouse();
/* add other initializations here */
}
To wyskakuje błąd
== allegro, Debug ===
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp||In function 'void init()':|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|3|error: 'allegro_init' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|4|error: 'desktop_color_depth' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|7|error: 'set_color_depth' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|8|error: 'GFX_AUTODETECT_WINDOWED' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|8|error: 'set_gfx_mode' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|10|error: 'allegro_error' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|10|error: 'allegro_message' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|11|error: 'exit' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|14|error: 'install_timer' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|15|error: 'install_keyboard' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\plik.cpp|16|error: 'install_mouse' was not declared in this scope|
== Build finished: 11 errors, 0 warnings ===
Czy ma to związek że program napisany jest na inną v. biblioteki ?