I've some problems getting it to work. I've compiled and installed Allegro5 with no problems ie:
ccmake -DCMAKE_INSTALL_PREFIX=/usr ..
make -j8
sudo make install
As for in eclipse I've added the libs in:
Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> GCC C++ Linker -> Libraries -> Library search path (-L)
which are:
`pkg-config --libs allegro-5.0 allegro_primitives-5.0 allegro_image-5.0 allegro_font-5.0 allegro_ttf-5.0`
The problem comes to that I get undefined reference errors of every allegro function call in the build-log.
I've tried to solve the problem och testing me through and googled after solutions, nothing worked.
Maybe 'sudo ldconfig' might help? It updates the library locations or some such.
Remove the -L from the pkg-config command.
Oh, I see eclipse did that because you put them in the wrong location. Put that command as extra libraries or whatever eclipse calls it.
I've already tried both solutions you guys/girls made. I've both removed -L and used ldconfig but it doesn't work.
I don't use any IDE's, but a command line that will successfully compile on Slackware is like
gcc -s -O2 -Wall t.c -o t -lallegro -lallegro_image -lallegro_ttf
Thanks Kallokoski!
This worked in terminal:
g++ -s -O2 -Wall test.cpp -o t -lallegro_primitives -lallegro_image -lallegro_ttf -lallegro_font -lallegro
Edit:
But as for in Eclipse this turns out to be:
g++ -s -O2 -Wall -lallegro_primitives -lallegro_image -lallegro_ttf -lallegro_font -lallegro -o"test" ./src/test.o
which creates errors, there is something wrong with the automation here. I maybe will solve it...