Missing Libraries in Linux
piston989

Hi all,

I installed allegro-5.2.6.0 on an Arch Linux system, and I am using Code::Blocks. I tried to link the allegro libraries, but I am getting

fatal error: allegro5/allegro_native_dialog.h: No such file or directory.

The file is indeed missing from the allegro-5.2.6.0/lib and allegro-5.2.6.0/include/allegro5, but so are other files that are not throwing errors.

I eventually found the file in allegro-5.2.6.0/addons/native_dialog/allegro5/, but I can't figure out how to link it in Code::Blocks. Copying the file into the relevant directories didn't seem to work.

Is there a way I can create a monolith.so to mirror the windows monolith.dll, or something along those lines so that I just link one file and everything just works? I do not have a working windows install or I would just do that.

Any advice, suggestions or solutions would be greatly appreciated. Thank you!

Edgar Reynaldo

Yes, you can follow the directions for installing from git :

https://liballeg.org/git.html

You'll need to install GTK3 or better to get the native dialog addon on Linux.

You can follow along with instructions I made for Windows, but they mostly apply to Linux too.

http://members.allegro.cc/EdgarReynaldo/BuildA5.html

But on Arch, you'll likely use your package manager to install most of the dependencies. Allegro should handle its dependencies itself, so if you install allegro-dev you should have them. Then just use CMake and make to install allegro. You can select -DWANT_MONOLITH=On from the command line or use cmake-gui and select the WANT_MONOLITH option.

piston989

Thank you very much replying, as well as for writing such a thorough guide! I will reinstall and try to follow it as closely as possible. I wasn't sure it was installed correctly but you've confirmed that it wasn't.

"I must have put a decimal point in the wrong place or something. I always do that, I always mess up some mundane detail." - Michael Bolton

I really appreciate your quick and detailed response, cheers!

Edit: After clearing my first git installation, I checked my dependencies with the package manager. It turns out, allegro is in the standard Arch user libraries, and simply installing it with pacman solved all of my issues. I had to undo all the configurations I had attempted, as they seem to only be necessary in windows?

In case any other Arch users have this issue, the steps I took to install were:

$ sudo pacman -Suy allegro

open editor (in my case code::blocks) and link the needed allegro libraries (/lib/liballegro*) in the project build settings.

The project then compiled without a hitch.

Thank you very much Edgar! Your comment about the package manager and the dependencies solved my issues. I did not get the monolith files using this method, but I could always compile it myself using your instructions if necessary!

Thread #618287. Printed from Allegro.cc