简体   繁体   English

如何修复错误:Cygwin gcc不能与--compiler = mingw32一起使用

[英]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 . 这还将安装其他软件包(通过依赖项),这些软件包提供兼容的binutilsheaderslibrariesruntime

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.

相关问题 Cygwin中的pip安装找不到文件错误 - pip install in Cygwin cannot find file error Python3无法连接错误? 怎么修? - Python3 Cannot concatenate error? How to fix? 获取 Python 错误 -->PermissionError: [WinError 32] 进程无法访问该文件,因为它正被另一个进程使用 - Getting Python error -->PermissionError: [WinError 32] The process cannot access the file because it is being used by another process 如何在cygwin下配置python32解释器以在窗口中进行Eclipse? - How to configure python32 interpreter under cygwin for eclipse in window ? 如何修复 cmdline 执行错误? 使用python爬取网页 - How to fix a cmdline excute error? Used python to crawl a web page 如何解决“ ImportError:无法导入名称'_win32stdio'”? 障碍中的典型解决方案 - How to fix “ImportError: cannot import name '_win32stdio'”? Typical solutions at a roadblock 如何修复错误:除以零不是常量表达式 TDM-GCC 和 Pip - How To Fix error: division by zero is not a constant expression TDM-GCC and Pip 如何修复:MSYS2 MinGW 中的 PyInstaller“您的平台尚不受支持” - How to fix: PyInstaller in MSYS2 MinGW 'Your platform is not yet supported' 如何修复熊猫中的“无法设置列不匹配的行”错误 - How to fix "cannot set a row with mismatched columns" error in pandas 无法解决此“其他”语句错误 - cannot fix this “else” statement error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM