Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify win32 or Windows 64 target with cross compiler i686-w64-mingw32-gcc

I have recently downloaded the mingw-w64 package under Fedora Linux in order to be able to cross compile targetting both win32 and "Windows 64". But I fail to understand how to specify what target I want to use. What flags do I need to supply to gcc and to the linker in order to choose my target architecture?

like image 477
Dov Grobgeld Avatar asked Sep 16 '11 07:09

Dov Grobgeld


1 Answers

W32 and W64 are two different architectures, so you distinguish by compiler name. The debian mingw-w64 calls them i686-w64-mingw32-gcc for Win32 and x86_64-w64-mingw32-gcc for Win64.

like image 104
thiton Avatar answered Sep 18 '22 21:09

thiton