Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gcc 从linux交叉编译windows 64位.exe_Gcc_64 Bit_Cross Compiling_X86 64 - Fatal编程技术网

Gcc 从linux交叉编译windows 64位.exe

Gcc 从linux交叉编译windows 64位.exe,gcc,64-bit,cross-compiling,x86-64,Gcc,64 Bit,Cross Compiling,X86 64,我知道如果我想在Linux上为windows编译一个32位的.exe,我可以在Linux上安装并使用mingw32包(例如apt get install mingw32)。如果我想编译一个64位的windows.exe怎么办?有没有工具或方法可以做到这一点?看来我的答案取决于可用于主机操作系统Linux、Darwin和Windows的项目@Hannes de Jager:你能告诉我在apt get install mingw32之后如何编译以生成exe吗?你也可以试着回答我的问题和i586-mi

我知道如果我想在Linux上为windows编译一个32位的.exe,我可以在Linux上安装并使用mingw32包(例如apt get install mingw32)。如果我想编译一个64位的windows.exe怎么办?有没有工具或方法可以做到这一点?

看来我的答案取决于可用于主机操作系统Linux、Darwin和Windows的项目

@Hannes de Jager:你能告诉我在
apt get install mingw32
之后如何编译以生成exe吗?你也可以试着回答我的问题和i586-mingw32msvc-cc helloworld.c-o helloworld.exe,如果你想在linux下测试它:wine helloworld.exe(假设你安装了wine),我也有很好的使用Mingw-w64的经验。从Linux上下载是很容易的。