python-3.x - How to fix error: Cygwin gcc cannot be used with --compiler=mingw32
问题描述
I'm trying to install this project: 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. It's seems to come from my distutil configuration. My distutils.cfg
file contains:
[build]
compiler=mingw32
I tried that solution but it doens't helped: 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
. Instead, you should also install the mingw64-x86_64-gcc-core
package which provides the GCC for Win64 toolchain (C, OpenMP)
. This will also install other packages (through dependencies) which provide compatible binutils
, headers
, libraries
, and runtime
.
In your Makefile or compiler command line, replace gcc
with x86_64-w64-mingw32-gcc
. This will allow you to compile and link executables which do not depend on the cygwin1.dll
.
推荐阅读
- c++ - 理解 C 链接器错误:多重定义
- angular - 如何在 ionic 4 和 angular 7 中正确导入管道?
- elasticsearch - 过期滚动上下文的 Elasticsearch 回复
- tensorflow - tx2 protobuf 上的张量流
- azure-devops - 在 Azure DevOps 构建定义中下载最新版本的构建工件时未找到最新构建
- r - R:从基于连续变量的分类变量创建一个新的分类变量
- git - 如何将 TFS 拉取请求中的 Jenkins 作业与合并的分支进行排队
- php - PHP代码问题...数组中的数据但在HTML中显示记录时丢失了一些东西?
- python - Python Sphinx 包含指令:忽略包含文件中的标头
- python - 来自 SciKit-Learn 的 LabelEncoder 的 TypeError