Library Setup for Eclipse

I haven't programmed in a couple years. Last time I used Allegro 4. Now I'm trying Allegro 5. There are numerous .so files. To just do a hello world type program, which file should I use?
I was trying in hopes it call additional libs as needed. Is this the correct file? It's located under //usr/lib/x86_64-linux-gnu.
On top of that, I can't get Eclipse to recognize it.
Any help would be greatly appreciated.

Edgar Reynaldo

The official and repo binaries come as a set of addons. You need to link every one that your program uses.

If you build allegro yourself, you can build a monolithic .so file that includes core allegro and all the addons bundled with it.


Thanks Edgar,

I installed using Ubuntu PPA. I'm guessing that's using binaries given I didn't see it compiling anything.

I thought I seen a listing of the libraries and what they are used for. I can't recall where I found them but I'll run across it somewhere. However, is there a "main" file or are there a different file for each init, keyboard, video, etc.

I'll figure out Eclipse's set up eventually but I need to make sure I'm trying to link an actual library file.

Thanks again and sorry for my limited familiarity.

In reference to another thread on this site, this is why some of us older DOS guys stay with A4 ;D.

Edgar Reynaldo

For a simple hello world you'll likely want just allegro, unless it's graphical text in which case you might want font and ttf addons. Then if you want to draw, there's the primitives addon. There is also an audio addon, acodec addon, color addon, image addon, and a few more :


What does eclipse expect for the linker? A file path? Just add the .so files to the link libraries, or add in -lNAME linker options for gcc and set the link directory using -L "/usr/lib/local". Or if you like pain, use pkg-config.



I got it working yesterday. I was entering library name wrong into the linker section of eclipse. Between using/dropping the .so and adding/removing lib along with wrong filename altogether I never hit the right combination. I eventually found the right file and dropped the lib and .so. Worked fine.

In just testing the waters, I included the primitive addon as well and it worked fine. I appreciate the help. Now to tackle event programming. Any suggestions on tutorials?

Edgar Reynaldo

For beginners, I recommend Vivace on the wiki. For those who need more condensed code, try the example program's source code on github.


I have a video on YouTube with a basic framework. The source is on Github.

If you want to try it.

While I use MSVS, the code 'should' work with other compilers.


Hey Thx Edgar and DanielH. I appreciate the direction. I'll give these a try. Sorry for the delay in responding. Was sure the thread would have been locked by now ;D.

Thread #618770. Printed from