2010-04-22 223 views
9

我知道,如果我想在Linux上编译一个32位的.exe文件,我可以在Linux上安装和使用mingw32软件包(例如apt-get install mingw32)。如果我想编译一个64位的windows.exe,该怎么办?有工具或方法来做到这一点?交叉编译Windows 64位.exe从Linux

+0

@Hannes德雅格:你能告诉我如何'后的apt-get安装mingw32'编译序生成exe文件?你也可以请尝试回答我的问题http://stackoverflow.com/questions/2733402/how-to-build-gnu-libiconv-on-for-windows和http://stackoverflow.com/questions/2731211/windows -build-system-how-to-build-a-project-from-its-source-code-which-doesnt和http://stackoverflow.com/questions/2709589/looking-for-information-on-porting-linux -apps-to-windows – claws 2010-04-29 05:47:32

+0

i586-mingw32msvc-cc helloworld.c -o helloworld.exe – 2010-05-04 12:51:55

+0

如果你想在linux下测试它: wine helloworld.exe (假设你已经安装了wine) – 2010-05-04 12:52:43

回答

5

它看起来像我的答案是与Mingw-w64项目,该项目可用于主机操作系统的Linux,达尔文&的Windows

+0

我也有很好的体验与Mingw-w64。从Linux中很容易[64位Windows交叉编译](http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux)。 – 2011-06-04 02:33:48