You are not logged in.

#1 2010-02-25 19:44:35

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Help installing Allegro in Arch for use with Code::Blocks

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

#2 2010-02-25 22:54:06

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: Help installing Allegro in Arch for use with Code::Blocks

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

#3 2010-02-26 01:13:41

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Help installing Allegro in Arch for use with Code::Blocks

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

#4 2010-02-26 02:43:05

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Help installing Allegro in Arch for use with Code::Blocks

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

#5 2010-02-26 05:51:12

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Help installing Allegro in Arch for use with Code::Blocks

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

Board footer

Powered by FluxBB