如何用交叉编译器i686-w64-mingw32-gcc指定win32或Windows 64目标 [英] How to specify win32 or Windows 64 target with cross compiler i686-w64-mingw32-gcc
问题描述
我最近下载了Fedora Linux下的mingw-w64软件包,以便能够针对win32和Windows 64进行交叉编译。但我不明白如何指定我想要使用的目标。我需要为gcc和链接器提供哪些标记以选择我的目标架构?
解决方案W32和W64是两种不同的体系结构,所以你可以通过编译器名称来区分Debian mingw-w64称它们为Win32的i686-w64-mingw32-gcc和Win64的x86_64-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?
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.
这篇关于如何用交叉编译器i686-w64-mingw32-gcc指定win32或Windows 64目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!