Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Setting up ANY gui for A5

Credits go to jmasterx for helping out!
This thread is locked; no one can reply to it. rss feed Print
Setting up ANY gui for A5
Johan Halmén
Member #1,550
September 2001

I have set up A5 on a laptop. I use CodeBlocks and mingw64 and everything seems to work. At this point I'd like to include a gui library that works nicely with A5. Since A5 includes stuff like event handling, it would be nice if the gui library wouldn't ignore A5's event system, but would instead build on it. It would also be nice if the library could be easily built without rewriting a lot of makefiles which originally was written for VisualStudio.

Do I have to build the lib from source or are there binaries available for any setup of Windows compilers and architecture (32 vs 64)? Since I prefer an IDE over command line and makefile stuff, I know nothing about creating and rewriting makefiles. It's in my todo list to learn to use all that stuff, but so far I haven't found any resources for self studies. But that's really another discussion. Right now I'd like to have a working gui lib installed together with A5/Codeblocks/mingw64. Any help would be nice. The first one to recommend their own gui together with a step-by-step guide will have a devoted user, always recommending their lib in all gui discussions. :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Chris Katko
Member #1,881
January 2002
avatar

What do you mean by GUI? A bitmap dialog system inside Allegro 5, or interfacing with Windows/Linux/etc operating system GUI? (ala Allegro 5 inside a normal dialog for a tool.)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

jmasterx
Member #11,410
October 2009

Johan Halmén
Member #1,550
September 2001

What do you mean by GUI?

An AGUI like library. I'm pretty sure AGUI is the library I'll be using, if I only get it installed. Must work through that first link you provided, jmasterx. Thanks for that, and thanks for the lib itself.

<edit>
Ok, I'm on my way. I got Cmake to create a codeblocks project file. But I have no idea if I got everything right there. Cmake seems to have accepted all settings.

But in Codeblocks I got this annoying error:

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

And it points to Allegro5Font.hpp. Codeblocks normally offers path settings either for the IDE itself or for the particular project. But in this project I can't set the project's own search paths, only the IDE paths, which won't affect this problem.

<edit>
Ok, now I got Codeblocks to compile and build everything with just 4 warnings. Haven't checked that yet. It required me to add line 116 in CMakeList.txt:

include_directories ("C:\CodeBlocks\mingw64\include")

...because that's where I have the A5 stuff. While all AGUI stuff is in a completely other directory, where I wish to build the lib files.

<edit>
Crashing. First I had wrong lib order for the linking. Obviously these new agui libs must come before the allegro libs. But when I finally had my exe done (from agui_example), it crashed. I tried to place the data folder in the right place, but launching from Windows gives me a complaint about missing libgcc_s_seh-1.dll. What's that?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Johan Halmén
Member #1,550
September 2001

Damn! I had wished I could create statically linked stuff. Is there something fundamentally dll oriented in AGUI or can one create static libraries out of the files? I throw in whatever dll files it asks, so far libgcc_s_seh-1.dll and libwinpthread-1.dll. Right now it just crashes without asking for more dll:s.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

jmasterx
Member #11,410
October 2009

I'm able to static link Agui with MSVC, I imagine the same is possible with g++.
Maybe use depends http://www.dependencywalker.com/ to see what it needs.

Johan Halmén
Member #1,550
September 2001

And I might need the latest version of AGUI. Found out there's one from 2015, while I seem to have some from 2012.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

jmasterx
Member #11,410
October 2009

Get latest git sources. They are the most stable.

Polybios
Member #12,293
October 2010

jmasterx said:

Maybe use depends http://www.dependencywalker.com/ to see what it needs.

You might also be able to simply use the ldd script if that comes with your version of mingw64.

Johan Halmén
Member #1,550
September 2001

I'm working with the latest git sources. I get this error in gui.cpp:

error: call of overloaded 'abs(double&)' is ambiguous

And then it suggests a bunch of candidates, all of which are different ints, but no floats. Anyway, since abs is not ambiguous at all, any library should do. So I just put std:: in front of each occurrence of abs, there are three of them.

<edit>
Working! Still don't know which dll files I might have to include, but that's no problem. If dll files are meant to be included in any distribution of any program I create, then so be it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Go to: