Building matplotlib from source on windows

mk mrkafk at
Mon Jan 26 15:18:02 CET 2009

Hello everyone,

I'm trying to get 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 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 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
build\temp.win32-2.6\Release\cxx\cxxsupport.o build\temp.win32-2.6\Re
build\temp.win32-2.6\Release\cxx\indirectpythoninterface.o build\
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
cannot find -lgw32c
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

What the heck is lgw32c??


More information about the Python-list mailing list