/tmp/ccl9Xu4P.o: In function `install_allegro':
allegro_test.cpp:(.text+0x10): undefined reference to `_get_allegro_version'
allegro_test.cpp:(.text+0x28): undefined reference to `get_config_text'
allegro_test.cpp:(.text+0x2d): undefined reference to `allegro_error'
allegro_test.cpp:(.text+0x41): undefined reference to `ustrzcpy'
allegro_test.cpp:(.text+0x63): undefined reference to `_install_allegro'
/tmp/ccl9Xu4P.o: In function `main':
allegro_test.cpp:(.text+0x98): undefined reference to `allegro_exit'
collect2: ld returned 1 exit status
I teraz moje pytanie. Co można zrobić by kompilowało się? Byłbym wdzięczny za pomoc.
! /usr/include/allegro.h.gch
all.cpp
all.cpp
/tmp/ccgUYrCs.o: In function `main':
all.cpp:(.text+0x4d): undefined reference to `_install_allegro_version_check'
all.cpp:(.text+0x52): undefined reference to `install_keyboard'
all.cpp:(.text+0x5e): undefined reference to `set_color_depth'
all.cpp:(.text+0x8a): undefined reference to `set_gfx_mode'
all.cpp:(.text+0x91): undefined reference to `default_palette'
all.cpp:(.text+0x96): undefined reference to `set_palette'
all.cpp:(.text+0x9b): undefined reference to `screen'
all.cpp:(.text+0xc7): undefined reference to `makecol'
all.cpp:(.text+0xcd): undefined reference to `font'
all.cpp:(.text+0xd3): undefined reference to `screen'
all.cpp:(.text+0x103): undefined reference to `textout_ex'
all.cpp:(.text+0x108): undefined reference to `readkey'
all.cpp:(.text+0x10d): undefined reference to `allegro_exit'
collect2: ld returned 1 exit status
No command 'allgero-config' found, did you mean:
Command 'allegro-config' from package 'liballegro4.2-dev' (universe)
...
a kiedyś mi się odpalało ładnie
tego liballegro4.2-dev mam abgrejdniętego do najnowszej wersji wie ktoś o co chodzi??
"g++ all.cpp -lalleg" załatwi sprawę ;p
Co do allegro-config to przecież ubuntu Ci ładnie podpowiada, że psychob zrobił literówkę i zamienił pozycje "e" z "g" w słowie allegro (jednak "allegro-config --libs" wypluje zapewne tylko -lalleg, więc nie ma sensu go wywoływać za każdym razem (możesz sprawdzić wpisując do konsoli "allegro-config --libs" i zobaczyć co wypluje (powinien -L/usr/lib (jeśli tam jest zainstalowana biblioteka... ale wtedy jest to zbędne) i -lalleg)))