John Salvatier
John Salvatier

Reputation: 3217

Building QuantLib python bindings on windows 7: 'unrecognized command line option '-mno-cygwin''

I'm trying to build the QuantLib Python bindings. I managed to build QuantLib using these instructions (I found the libboost_serialization files here). When I try python setup.py build, I get the following error

python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
C:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python26\include -IC:\Python26\PC -c QuantLib/quantlib_wrap.cpp -o build\temp.win32-2.6\Release\quantlib\quantlib_wrap.o
cc1plus: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1 

I've heard that the mno-cygwin option is no longer supported and I've seen it removed from numpy distutils, but as far as I can tell this is only using python distutils. Any hints on what I should look at?

Upvotes: 1

Views: 1404

Answers (2)

Tiago M. Vieira
Tiago M. Vieira

Reputation: 31

I've done a tutorial that builds Quantlib Python bindings on Windows (Vista and XP). This probably will work with Windows 7 as well and you don't need Visual Studio. here

Upvotes: 3

John Salvatier
John Salvatier

Reputation: 3217

The answer is that Python 2.6 distutils hasn't caught up with MinGW (source). I now get another error, but that's for another question.

Upvotes: 1

Related Questions