C++ MinGW、MinGW-w64 和 MinGW-builds 之间有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25582110/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the difference between MinGW, MinGW-w64 and MinGW-builds?
提问by Romain
What are the differences between MinGW, MinGW-w64and MinGW-builds?
MinGW、MinGW-w64和MinGW-builds之间有什么区别?
And which one should I use to compile c++ 11 source code with the Eclipse IDE on a Windows 8 machine?
我应该使用哪一个在 Windows 8 机器上使用 Eclipse IDE 编译 c++ 11 源代码?
回答by deviantfan
MinGW is a GCC-port for Windows. Not all of the Windows API is supported (but for many programs the supported stuff is sufficient) and it′s only for 32bit-Programs (which often can run on 64bit-Windows too, but some can′t, and you can′t compile them as 64bit).
MinGW 是 Windows 的 GCC 端口。并非所有的 Windows API 都受支持(但对于许多程序而言,支持的东西就足够了)并且它仅适用于 32 位程序(通常也可以在 64 位 Windows 上运行,但有些不能,而且你不能将它们编译为 64 位)。
MinGW-w64is a improved version which supports both 32bit and 64bit, and some more of the WinAPI (still not all, because thats much work, but more than MinGW).
MinGW-w64是一个改进版本,它支持 32 位和 64 位,以及更多的 WinAPI(仍然不是全部,因为那是很多工作,但比 MinGW 多)。
MinGW-w64 only provides their source code, but no binaries to "just use" the compiler.
MinGW-w64 只提供他们的源代码,但没有二进制文件来“只使用”编译器。
MinGW-builds is a somewhat separate project to provide binaries in the most useful configurations. To get a specialized build of MinGW-w64, manual compiling is still possible.
MinGW-builds 是一个有点独立的项目,以最有用的配置提供二进制文件。要获得专门构建的 MinGW-w64,仍然可以手动编译。
Using the MinGW-builds self-installeris the easiest way, if nothing unusual is needed. Also see herefor help with the self-installer.
如果不需要任何异常情况,使用MinGW-builds 自安装程序是最简单的方法。另请参阅此处以获取有关自安装程序的帮助。
回答by A Fog
(edited) Mingw compiles your code to Windows binaries that run under Windows.
(已编辑)Mingw 将您的代码编译为在 Windows 下运行的 Windows 二进制文件。
Windows subsystem for Linux (WSL) makes Linux binaries. You can install other Linux programs under WSL, except if you need a graphical interface. You can access the Windows filesystem from WSL, but not vice versa.
适用于 Linux 的 Windows 子系统 (WSL) 生成 Linux 二进制文件。您可以在 WSL 下安装其他 Linux 程序,除非您需要图形界面。您可以从 WSL 访问 Windows 文件系统,但反之则不行。
Cygwin makes Windows binaries that can run under Windows outside the Cygwin shell, as long as you have the Cygwin DLL. This gives a Linux-like environment that is fully compatible with Windows.
Cygwin 使 Windows 二进制文件可以在 Cygwin shell 之外的 Windows 下运行,只要您拥有 Cygwin DLL。这提供了一个与 Windows 完全兼容的类似 Linux 的环境。
I don't know about Mingw-builds. Can anybody please answer what kind of binaries it makes?
我不知道 Mingw-builds。有人可以回答它产生什么样的二进制文件吗?