# MinGW Windows Cross-Compile Error

While I was developing my game on Linux (I'm using an ARM system), I decided that I want to cross-compile it to Windows. Yet, I get an error while I try to link Allegro (version 4.2) to the compiler.

I have installed MinGW32 (x86_64-w64-mingw32-c++ in the terminal) and have moved the bin / include / lib folders from the Windows Allegro version to the /usr/x86_64-w64-mingw32-c++/ folder.

When I enter into the command line:

x86_64-w64-mingw32-c++ *.cpp -o W_Survival allegro-config --libs


It returned to me a linking error:

/usr/bin/x86_64-w64-mingw32-ld: unrecognized option '-z'
/usr/bin/x86_64-w64-mingw32-ld: use the --help option for usage  information
collect2: ld returned 1 exit status


The compiling is all the same as I would do it using g++. the only thing different is that I have it set to compile for windows.

Is there anything that I did wrong? All help is appreciated :)

• did you correctly link against a 64-bit mingw version of the allegro libs? – tubberd Feb 12 '16 at 15:33
• Oh my, that did the trick! After I put the 64-bit version in it all worked properly! Thanks! – PlatyPi Feb 13 '16 at 19:29
• Ill add that ad an answet then :D – tubberd Feb 14 '16 at 14:40
• do you mind accepting this as the answer? for one, this will help people who have the same or similar problems. – tubberd Feb 15 '16 at 1:07