Building matplotlib from source on windows

mk mrkafk at gmail.com
Mon Jan 26 09:18:02 EST 2009


Hello everyone,

I'm trying to get 0.98.5.2 installed on Windows to use Python 2.6 
(dependency packages I need to use on that version, long story, etc).

When I was trying to build it (python setup.py build), it was finding 
the VC 9.0 C++ compiler on my comp. However, after adding necessary 
packages (zlib, png, etc), it was reporting missing 'unistd.h'. Clearly, 
this means it was meant to be built with GCC for Windows like MinGW ?

I have uninstalled the VC compiler, installed GnuWin32 packages and 
tried using MinGW (passing --compiler=mingw32 to python setup.py build ) 
but now compilation process fails like this:

c:\MinGW\bin\g++.exe -mno-cygwin -shared -s 
build\temp.win32-2.6\Release\src\ft2font.o build\temp.wi
n32-2.6\Release\src\mplutils.o 
build\temp.win32-2.6\Release\cxx\cxxsupport.o build\temp.win32-2.6\Re
lease\cxx\cxx_extensions.o 
build\temp.win32-2.6\Release\cxx\indirectpythoninterface.o build\temp.win
32-2.6\Release\cxx\cxxextensions.o 
build\temp.win32-2.6\Release\src\ft2font.def -LC:\Python26\libs -
LC:\Python26\PCbuild -lfreetype -lz -lgw32c -lstdc++ -lm -lpython26 
-lmsvcr90 -o build\lib.win32-2.6
\matplotlib\ft2font.pyd
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: 
cannot find -lgw32c
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

What the heck is lgw32c??

Regards,
mk




More information about the Python-list mailing list