Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Cross-Compiling Allegro 5 library on Linux for Windows

This thread is locked; no one can reply to it. rss feed Print
Cross-Compiling Allegro 5 library on Linux for Windows
iheartcoffee
Member #16,518
August 2016
avatar

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
Member #8,592
May 2007
avatar

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
Member #16,518
August 2016
avatar

Thanks, let me know how it compiles :)

Edgar Reynaldo
Member #8,592
May 2007
avatar

Alexandre Martins
Member #10,658
February 2009

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
Member #11,822
April 2010

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).

Go to: