The alternative is to build one yourself, but it will be extremely slow on cygwin. If you are a Linux user, you can build a native compiler (which runs in cmd.exe on windows, and produces native win32 binaries) on Linux. It is much faster (order of magnitude faster in my experience).
Otherwise, mingw is a good solution, although in my experience, the binary from equation.com work better for gcc 4.4 (there is no official gcc 4.4 from MinGW yet)
If you don't need the cygwin environment for special reasons, I'd go for Mingw with the gcc 4.4. You can find builds on: http://www.tdragon.net/recentgcc/.
Reading the MinGW FAQ, reveals that its possible to pass requests to use the MinGW binaries instead of the ones shipped with Cygwin.
For those who would like to use the Cygwin environment for development, yet generate non-Cygwin-dependant executables, a much easier option to "-mno-cygwin" does exist. Simply install Cygwin and the MinGW distribution in separate directories (i.e. "C:\CYGWIN" and "C:\MINGW"), and make sure that the "/bin" subdirectory beneath your MinGW installation comes before Cygwin's "/bin" subdirectory in your PATH environment variable (i.e. "PATH=%PATH%;C:\MINGW\BIN;C:\CYGWIN\BIN"). This will allow you access to all the UNIX tools you want, while ensuring that the instance of GCC used is the MinGW version. %%%
Bear in mind that within the "/etc/profile" file, Cygwin by default places "/usr/local/bin", "/usr/bin", and "/bin" ahead of your system-level PATH. Therefore, it is not enough to have the MinGW's "/bin" ahead of Cygwin in your Windows path... it must also be set to come first within the Cygwin environment (either by modifying "/etc/profile" or setting it manually).
发布评论
评论(3)
另一种方法是自己构建一个,但在 cygwin 上速度会非常慢。 如果您是 Linux 用户,则可以在 Linux 上构建本机编译器(在 Windows 上的 cmd.exe 中运行,并生成本机 win32 二进制文件)。 它要快得多(根据我的经验,速度要快几个数量级)。
否则, mingw 是一个很好的解决方案,尽管根据我的经验,来自 的二进制文件equation.com 对于 gcc 4.4 工作得更好(MinGW 还没有官方的 gcc 4.4)
The alternative is to build one yourself, but it will be extremely slow on cygwin. If you are a Linux user, you can build a native compiler (which runs in cmd.exe on windows, and produces native win32 binaries) on Linux. It is much faster (order of magnitude faster in my experience).
Otherwise, mingw is a good solution, although in my experience, the binary from equation.com work better for gcc 4.4 (there is no official gcc 4.4 from MinGW yet)
如果您出于特殊原因不需要 cygwin 环境,我会选择带有 gcc 4.4 的 Mingw。 您可以在以下位置找到构建:http://www.tdragon.net/recentgcc/。
If you don't need the cygwin environment for special reasons, I'd go for Mingw with the gcc 4.4. You can find builds on: http://www.tdragon.net/recentgcc/.
阅读MinGW FAQ,发现可以传递使用 MinGW 二进制文件而不是已发布的二进制文件的请求与西格温。
Reading the MinGW FAQ, reveals that its possible to pass requests to use the MinGW binaries instead of the ones shipped with Cygwin.