You are not logged in.
I've tried to find the solution to my problem on the code::blocks wiki and the allegro sites and even on the ubuntu forums, but to no avail. I've installed Allegro from AUR and I've linked the libraries in codeblocks like this:
'allegro-config --libs'But when I run an allegro .c or .cpp file this happens:
obj/Debug/main.o||In function `main':|
/home/glenn/Desktop/testing/main.c|3|undefined reference to `_install_allegro_version_check'|
/home/glenn/Desktop/testing/main.c|4|undefined reference to `set_gfx_mode'|
/home/glenn/Desktop/testing/main.c|5|undefined reference to `install_keyboard'|
/home/glenn/Desktop/testing/main.c|6|undefined reference to `font'|
/home/glenn/Desktop/testing/main.c|6|undefined reference to `screen'|
/home/glenn/Desktop/testing/main.c|6|undefined reference to `textout_ex'|
/home/glenn/Desktop/testing/main.c|7|undefined reference to `key'|
/home/glenn/Desktop/testing/main.c|8|undefined reference to `allegro_exit'|
||=== Build finished: 8 errors, 0 warnings ===|Key words: undefined reference. I think this may have something to do with improper linking or something. But I'm a noob and I need help.
Offline
An undefined reference is when you link against some function but it isn't provided by any libraries you've linked against. That allegro-config command looks right though. Perhaps you should install allegro from [community] instead?
"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page
Offline
I think I installed the one from [extra]. I'll try the community one when I get a chance, and I'll report back with the results.
Offline
Okay, I compiled Allegro 4.2.2 from source and I'm still getting the same error messages. Also, I couldn't find Allegro in [community].
Offline
Well, I just got back from the Allegro IRC room and it turns out that
'allegro-config --libs'is incorrect. It's actually:
`allegro-config --libs`Forgive me for not noticing!
The problem is fixed.
Last edited by ac3raven (2010-02-26 05:51:30)
Offline