2

I'm trying to compile my code with these flags :

g++ load.cpp -o load -I/usr/local/include/allegro5 -Wall -L/usr/local/lib -lallegro `pkg-config --libs allegro-5 allegro_audio-5 allegro_dialog-5 allegro_image-5 allegro_memfile-5 allegro_primitives-5 allegro_acodec-5 allegro_color-5 allegro_font-5 allegro_main-5 allegro_physfs-5 allegro_ttf-5`

And I receive this error :

load.cpp:3:10: fatal error: allegro5/allegro_native_dialog.h:  No such file or directory

 # include <allegro5/allegro_native_dialog.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I researched and I found these questions : Allegro 5 No such file or directory, Allegro native dialogues not recognized ... but nothing works.

Ps : I installed all dependencies and updated the entire system.

How can I fix it, is there a way to install this lib or pass the path to g++ ?

  • Can you actually find the file `allegro_native_dialog.h` at `/usr/local/include/allegro5/allegro5/` on your hard drive? If not maybe check the following dir `/usr/local/include/allegro5/`. If this works you can set your include path of your g++ to `-I/usr/local/include/`. – TobiSH Mar 06 '18 at 19:37
  • None of both u mentioned. I use Ubuntu 17.10 Budgie. –  Mar 06 '18 at 20:17
  • How did you installed Allegro? If you can spot the Allegro header files you have to pass this path as the -I parameter to g++ – TobiSH Mar 06 '18 at 21:22
  • This way [github.com/Sphinxs/Scripts/blob/master/Allegro.sh](https://github.com/Sphinxs/Scripts/blob/master/Allegro.sh) –  Mar 07 '18 at 19:06

1 Answers1

2

As far as I can see allegro_native_dialog.h is not part of liballegro5-dev (This list of files of a package might help you: liballegro5-dev).

You have to install the package liballegro-dialog5-dev. This contains the header file (+ libs) for the native dialog. So just extend your install script by

apt-get install liballegro5-dev liballegro-dialog5-dev

Hope that helps

TobiSH
  • 2,833
  • 3
  • 23
  • 33