I tried installing the Allegro library today. I have same experience in C++, but it seems I have none in doing stuff like that. I have compiled Allegro 5.0 from source and p
Allegro 5 uses pkg-config.
gcc foo.c -o foo $(pkg-config --libs allegro-5.0)
You will also need to specify addon libraries that you use:
gcc foo.c -o foo $(pkg-config --libs allegro-5.0 allegro_image-5.0)
You need to link with the Allegro libraries, but you don't seem to do so.
allegro-config --libs
returns nothing.
There's part of your problem. Normally, you should be able to add it to your command line, like so:
g++ `allegro-config --libs` test2.cc -o test2
On my system (Ubuntu 10.10) it gives this:
$ allegro-config --libs
-L/usr/lib -Wl,-Bsymbolic-functions -lalleg-4.2.2
Are you invoking the right allegro-config
? Maybe you should specify the full path to it?