Cross-Compiling Allegro 5 library on Linux for Windows
iheartcoffee

I found an article about cross-compiling Allegro on Linux for Windows here
However when I try to build Allegro 5 on Debian I notice that the mingw-w64 doesn't have the windows version of the libraries to compile Allegro. I think I can figure out CMAKE to configure for cross compiling but I'm not sure how to cross compile using MAKE.

Edgar Reynaldo

That guide is a little out dated. I've never cross compiled before but it should be as simple as installing the target compiler and cmake and building as usual.

Note here is my guide for building on Windows :
http://members.allegro.cc/EdgarReynaldo/BuildA5.html

You'll want to install mingw-w64, not mingw, as it comes with DX headers prepared for you.

I'll play around in my Ubuntu VM and see what I can come up with.

You'll want to install either 'g++-mingw-w64-i686' or 'g++-mingw-w64-x86-64' depending on your target architecture.

iheartcoffee

Thanks, let me know how it compiles :)

Edgar Reynaldo

I should warn you I've never cross compiled before, so no promises of results....

alemart

I have written an Allegro 5 cross-compiling guide for Open Surge. It may be of help: http://opensnc.sourceforge.net/wiki/index.php/Compiling_the_Source_Code

gusnan

I have written an Allegro 5 cross-compiling guide for Open Surge. It may be of help: http://opensnc.sourceforge.net/wiki/index.php/Compiling_the_Source_Code

Thanks - that is really useful - However I ran into a problem on my Debian 10 when cross-building openal, which can be fixed with the following patch to openal:

https://github.com/microsoft/vcpkg/commit/3baf583934f3077070e9ed4e7684f743ecced577

(Just thought I should mention it, if anybody else runs into it).

Thread #617999. Printed from Allegro.cc