[Allegro 5.1] Problem z kompilacją
Ostatnio zmodyfikowano 2012-05-07 15:39
Temes Temat założony przez niniejszego użytkownika |
[Allegro 5.1] Problem z kompilacją » 2012-05-06 19:39:07 Tak, znowu ja, znowu inna biblioteka, znowu problem...
Mam kilka błędów podczas kompilacji... Instalowałem Allegro wzorując się na tym tutorialu: http://wiki.allegro.cc/index.php?title=Windows_Vista,_Code::Blocks_10.05_and_Allegro_5
Problem w tym, że oni niedokładnie pokazali gdzie trzeba co wgrać... Wszystko, prócz "include", dałem w Debug - nie wiem czy dobrze...
A podczas kompilacji wyskakuje mi taki błąd: Linking console executable: bin\Debug\TestGry.exe c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lgcc_eh collect2: ld returned 1 exit status
A że nadal jestem frajerem w bibliotekach - zna ktoś jak rozwiązać mój problem?
//EDIT Dodam jedynie, że nie zgadza mi się to - w tutorialu pisali że musi być: - libgdiplus.a a w moim plikach MinGW nie znalazłem: - libgdiplus.a tylko - libgdi32.a
Czy to może być od tego? |
|
xevuel |
» 2012-05-06 20:52:42 Potrzebne ci -lgcc_eh w linkerze? A GDI+ to nowsza wersja biblioteki GDI, niestety standardowo niedostępna pod MinGW (bodajże na 4programmers.net był artykuł z kodem jednak działającym pod MinGW), jest natomiast częścią Visuala, i jest także dołączana do wersji Deva nowszych od 4.9.9.2 (nie wiem, czy do wszystkich, u mnie pod 5.1.0.0 jest). |
|
SeaMonster131 |
» 2012-05-06 20:55:12 |
|
Temes Temat założony przez niniejszego użytkownika |
» 2012-05-06 21:03:09 @up Jeżeli korzystam z tego poradnika tutaj z forum o instalacji bibliotek w Code::Blocks to z kolei wyskakują mi takie błędy w kodzie z tej strony: http://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays #include <stdio.h> #include <allegro5/allegro.h>
#define ALLEGRO_STATICLINK
int main( int argc, char ** argv ) { ALLEGRO_DISPLAY * display = NULL; if( !al_init() ) { fprintf( stderr, "failed to initialize allegro!\n" ); return - 1; } display = al_create_display( 640, 480 ); if( !display ) { fprintf( stderr, "failed to create display!\n" ); return - 1; } al_clear_to_color( al_map_rgb( 0, 0, 0 ) ); al_flip_display(); al_rest( 10.0 ); al_destroy_display( display ); return 0; }
Błędy: Linking console executable: bin\Debug\TestGry.exe obj\Debug\test.o: In function `main': C:/Users/c4/Desktop/TestGry/test.cpp:10: undefined reference to `al_install_system' C:/Users/c4/Desktop/TestGry/test.cpp:15: undefined reference to `al_create_display' C:/Users/c4/Desktop/TestGry/test.cpp:21: undefined reference to `al_map_rgb' C:/Users/c4/Desktop/TestGry/test.cpp:21: undefined reference to `al_clear_to_color' C:/Users/c4/Desktop/TestGry/test.cpp:23: undefined reference to `al_flip_display' C:/Users/c4/Desktop/TestGry/test.cpp:25: undefined reference to `al_rest' C:/Users/c4/Desktop/TestGry/test.cpp:27: undefined reference to `al_destroy_display' collect2: ld returned 1 exit status |
|
xevuel |
» 2012-05-06 21:11:16 |
|
Temes Temat założony przez niniejszego użytkownika |
» 2012-05-06 21:14:55 Rzeczywiście... Ale niestety nie rozumiem co wpisać i gdzie :/ ... |
|
SeaMonster131 |
» 2012-05-06 21:32:52 A co wpisałeś do linkera? |
|
Gabes |
» 2012-05-06 21:43:22 |
|
« 1 » 2 |