1

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

snoob dogg
  • 2,491
  • 3
  • 31
  • 54
  • The linked solution is outdated. `distutils` in Python 3 was changed due to [Issue #12641](https://bugs.python.org/issue12641). See [commit 6a9c0e5](https://github.com/python/cpython/commit/6a9c0e50a9d0e09011f59e7eca060473141e8f43). Try `--compiler=gcc` or `--compiler=g++`. – phd Mar 03 '19 at 17:30
  • I solved my problem by installing the unofficial python package https://www.lfd.uci.edu/~gohlke/pythonlibs/#triangle – snoob dogg Mar 03 '19 at 18:11

2 Answers2

1

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.

Doug Henderson
  • 785
  • 8
  • 17
0

A similar problem occured. I fixed it by changing mingw32 by gcc like @phd said.

snoob dogg
  • 2,491
  • 3
  • 31
  • 54