开发者

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

开发者 https://www.devze.com 2023-04-05 02:12 出处:网络
I have recently downloaded the mingw-w64 package under Fedora Linux in order to be able to c开发者_高级运维ross compile targetting both win32 and \"Windows 64\". But I fail to understand how to specif

I have recently downloaded the mingw-w64 package under Fedora Linux in order to be able to c开发者_高级运维ross 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消