![]() |
|
Make a static distribution of Allegro 5 in Windows 10 |
Eric Johnson
Member #14,841
January 2013
![]() |
Hi there, I'm a Linux user who is looking to distribute a Windows version of my KrampusHack 2016 game. Thanks to some friendly replies on my last thread, I was able to make a static distribution for Linux. Now I want to do the same for Windows. The thing is though, I haven't the faintest idea how to do that on Windows. Which compiler and IDE would you recommend using to compile Allegro 5 games on Windows? And how would I statically link it? I haven't used Allegro with Windows in a LONG time. Thank you for your time. Edit I understand that I need to set the search directory in Code::Blocks to the include directory from the Allegro download. That's fine. What about the libraries to link? What's the difference between md and mt files? Edit #2
|
GullRaDriel
Member #3,861
September 2003
![]() |
All by yourself :-) "Code is like shit - it only smells if it is not yours" |
Eric Johnson
Member #14,841
January 2013
![]() |
GullRaDriel said: All by yourself :-)
So far, yep! I've run into a bit of a snag though. Firstly, the compiler doesn't seem to know what std::stoi is: Quote: error: 'stoi' was not declared in this scope No problem though; I got around this by using std::stol instead. But when I run the program, I get the following error: Quote: Assertion failed: vec->_itemsize > 0, file d:\Libraries\build\allegro\src\allegro-git\allegro-git\src\misc\vector.c, line 174 There are no syntax errors or any errors of any kind when compiling, so I'm not sure what to make of this run-time error. Currently, I'm only linking with liballegro-5.0.10-monolith-mt-debug.a. Should I be using something else? Any ideas what could cause this error? Edit Quote: The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library C:\...\allegro=5.0.10-monolith-md.dll
Edit #2 Edit #3 Edit #4
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
You won't need to link the addons, but you will need to link a bunch of static libraries on Windows. The list is as follows : -static -ldumb -lFLAC -lvorbisfile -lvorbis -lfreetype -logg -lpng16 -lzlibstatic -lgdiplus -luuid -lkernel32 -lwinmm -lpsapi -lopengl32 -lglu32 -luser32 -lcomdlg32 -lgdi32 -lshell32 -lole32 -ladvapi32 -lws2_32 -lshlwapi Of course if you didn't use them you don't need them, but most of those windows libraries listed are mandatory. Use dependency walker to see if your program depends on any dlls. Also, 5.0.10 is really old, just so you know. The allegro.cc files page hasn't been updated in years. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Eric Johnson
Member #14,841
January 2013
![]() |
Thanks for writing, Edgar. I decided to dynamically link my game instead, and package the dlls. Edgar Reynaldo said: The allegro.cc files page hasn't been updated in years.
That's kind of sad, actually.
|
Elias
Member #358
May 2000
|
Eric Johnson said: That's kind of sad, actually.
Well, we have very up-to-date packages with every release instead now And Edgar is providing some binaries for some other mingw versions as well! -- |
Eric Johnson
Member #14,841
January 2013
![]() |
Well, we have very up-to-date packages with every release instead now
In Linux, I keep up to date by cloning Allegro from GitHub and building it myself. But it's good to know there are recent pre-built binaries on Windows.
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
As long as you didn't use Direct3D, you can use my binaries for MinGW 5.3.0 and Allegro 5.2.1.1. There are problems with dx9mgw.zip. I don't use the DXSDK because it's massive. https://sourceforge.net/projects/unofficialmingw/files/MinGW5302v3.tar.7z/download My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|