我試圖在win 7 64位使用mingw(64位)編譯一個帶有cython的python擴展。
我與Python 2.6(活動的Python 2.6.6),並用足夠的distutils.cfg文件(設置MinGW的,因爲編譯器)編譯與cython和mingw產生gcc:錯誤:無法識別的命令行選項'-mno-cygwin'
當執行工作
> C:\Python26\programas\Cython>python setup.py build_ext --inplace
我得到一個錯誤說GCC還沒有一個-mno-cygwin的選項:
> C:\Python26\programas\Cython>python setup.py build_ext --inplace
running build_ext
skipping 'hello2.c' Cython extension (up-to-date)
building 'hello2' extension
C:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python26\include -IC:\Python26\PC -c hello2.c -o build\temp.win-amd64-2.6\Release\hello2.o
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
GCC是:
C:\>gcc --version
gcc (GCC) 4.7.0 20110430 (experimental)
Copyright (C) 2011 Free Software Foundation, Inc.
我該如何解決它?
這裏是[鏈接](https://stackoverflow.com/a/43971456/4628439)!這解決了最新的Cython和MingW – 2017-06-22 10:04:03