Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » allegro_native_dialog.h : No such file or directory

This thread is locked; no one can reply to it. rss feed Print
allegro_native_dialog.h : No such file or directory
Psyroth
Member #14,233
April 2012

Hey allegro people !

I am new to allegro (bet you don't hear that everyday...) I seem to have managed to install everything ok and got a few programs running, but there's just one thing that I just can't seem to fix :

Whenever I include the <allegro5/allegro_native_dialog.h> I get a fatal error: allegro5/allegro_native_dialog.h: No such file or directory

All other addons seem to be working just fine (acodec, color, font, image etc)
My compiling method:
gcc allegrotest.cpp $(pkg-config --libs allegro-5.0 allegro_dialog-5.0)

I'm currently using Ubuntu 11.10 coding with Kate (if it matters :p)

This is the kind of program I try to run to test it:

#SelectExpand
1#include "allegro5/allegro.h" 2#include <allegro5/allegro_native_dialog.h> 3 4int main(){ 5 6 if(al_init()) { 7 al_show_native_message_box(al_get_current_display(), 8 "Window Title", 9 "Content Title", 10 "The error message here", 11 NULL, ALLEGRO_MESSAGEBOX_ERROR); 12 return 0; 13 } 14 15 return 0; 16}

Do you guys have any ideas ? I've spent my whole day trying to figure this out but I just can't seem to get it :s

Elias
Member #358
May 2000

You need GTK to compile that addon. In Ubuntu you probably need something like:

apt-get install libgtk2.0-dev

--
"Either help out or stop whining" - Evert

Psyroth
Member #14,233
April 2012

I already have the latest version of it (when I do the apt-get I get : libgtk2.0-dev is already the newest version. )
(I installed allegro and all the optional and non-optional dependencies they mention in http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_SVN/Linux/Debian )

and even when I compile it this way :
gcc `pkg-config --cflags --libs gtk+-2.0` allegrotest.cpp

I get the same error (if that is what you meant)

Matthew Leverton
Supreme Loser
January 1999
avatar

If you did a make install and that file was not copied, then you definitely did not build the native dialogs addon. If the gtk dev package exists now, then it probably did not when you built Allegro. Clear your Allegro cmake cache and rebuild.

Psyroth
Member #14,233
April 2012

Yep that did it thank you very much :D

Go to: