On Windows 7, when trying to compile pygraphviz, I run
python setup.py build -c mingw32
I get
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-IC:\Program Files (x86)\Graphv
iz 2.28\include\graphviz" -Ic:\Python27\include -Ic:\Python27\PC -c pygraphviz/g
raphviz_wrap.c -o build\temp.win-amd64-2.7\Release\pygraphviz\graphviz_wrap.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
Where is that '-mno-cygwin' coming from? Greping through the pygraphviz-1.1 directory shows no occurences of "no-cygwin".
Best Answer
See this answer: https://stackoverflow.com/a/6035864/1516291
In short, you may need to modify
distutils\cygwinccompiler.py
in your python installation dir to remove traces of-mno-cygwin
.