[英]How to fix error: Cygwin gcc cannot be used with --compiler=mingw32
I'm trying to install this project: https://github.com/drufat/triangle . 我正在尝试安装此项目: https : //github.com/drufat/triangle 。 Unfortunatly, I get the following error:
不幸的是,我收到以下错误:
error: Cygwin gcc cannot be used with --compiler=mingw32
I'm using the lastest version of gcc for Cygwin on Windows 7 64 bit and I'm trying to install that project for python 3.7.1. 我正在Windows 7 64位上使用最新版本的gcc for Cygwin,并且正在尝试为python 3.7.1安装该项目。 It's seems to come from my distutil configuration.
它似乎来自我的distutil配置。 My
distutils.cfg
file contains: 我的
distutils.cfg
文件包含:
[build]
compiler=mingw32
I tried that solution but it doens't helped: https://stackoverflow.com/a/16740123/5075502 我尝试了该解决方案,但没有帮助: https ://stackoverflow.com/a/16740123/5075502
The gcc
options to build for MinGW64
is no longer supported by the regular cygqin compiler gcc
, aka x86_64-pc-cygwin-gcc
. 常规cygqin编译器
gcc
aka x86_64-pc-cygwin-gcc
不再支持为MinGW64
构建的gcc
选项。 Instead, you should also install the mingw64-x86_64-gcc-core
package which provides the GCC for Win64 toolchain (C, OpenMP)
. 相反,您还应该安装
mingw64-x86_64-gcc-core
软件包,该软件包GCC for Win64 toolchain (C, OpenMP)
提供了GCC for Win64 toolchain (C, OpenMP)
。 This will also install other packages (through dependencies) which provide compatible binutils
, headers
, libraries
, and runtime
. 这还将安装其他软件包(通过依赖项),这些软件包提供兼容的
binutils
, headers
, libraries
和runtime
。
In your Makefile or compiler command line, replace gcc
with x86_64-w64-mingw32-gcc
. 在您的Makefile或编译器命令行中,将
gcc
替换为x86_64-w64-mingw32-gcc
。 This will allow you to compile and link executables which do not depend on the cygwin1.dll
. 这将允许您编译和链接不依赖
cygwin1.dll
可执行文件。
A similar problem occured. 发生了类似的问题。 I fixed it by changing
mingw32
by gcc
like @phd said. 我通过更改
gcc
mingw32
来修复它,如@phd所说。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.