使用MinGW(Dev-C ++)编译64位二进制 [英] Compile 64-bit binary with MinGW (Dev-C++)
问题描述
这可能是一个愚蠢的问题,但我正在搜索从大约3小时的答案。
如何编译64位二进制默认情况下,MinGW支持64位,但我无法激活此选项。
我试过-m64但它说:对不起,未实现:64位模式未编译在
Dev-C ++在Windows-7上
我知道如何在MSVC ++上做,但我不想MSVC ++(道德问题的原因)
我试图编译,只是为了测试目的:
#include< iostream> ;
using namespace std;
int main(int argc,char * argv [])
{
//测试编译模式
if(sizeof(void *)== 8)cout << 编译64位< endl
else cout<< 编译32位< endl
return 0;
}
构建64位二进制在窗口上你需要64位版本的mingw编译器。 Mingw-W64是一个可能的分配,你可以使用。您可以找到 此处下载 的列表。
此外,您还可以在 Orwell Dev-C ++ 下找到与mingw 64位编译器捆绑在一起的Dev-C ++设置。 / a> 的下载部分。请务必选择 TDM-GCC x64 4.7.1 设置或可移植。
It is probably a stupid question but i was searching for the answer from about 3h.
¿How to compile 64-bit binary with (Dev-C++) MinGW?
I have readed that MinGW support 64bits by default, but i am unable to active this option.
I have tryed "-m64" but it say: "sorry, unimplemented: 64-bit mode not compiled in"
I am working on Dev-C++ on Windows-7
I know how to do it on MSVC++, but I don't want MSVC++ (cause of ethical issues)
What i am trying to compile, just for testing purpose:
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
// Test compiling mode
if (sizeof(void*) == 8) cout << "Compiling 64-bits" << endl;
else cout << "Compiling 32-bits" << endl;
return 0;
}
To build a 64-bit binary on windows you need the 64-bit version of the mingw compiler. Mingw-W64 is one possible distribution you can use. You can find a list of downloads here.
Additionally, you can also find Dev-C++ setup bundled with mingw 64-bit compiler under Orwell Dev-C++'s download section. Make sure you choose "TDM-GCC x64 4.7.1" either setup or portable.
这篇关于使用MinGW(Dev-C ++)编译64位二进制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!