Several users have reported a problem compiling matplotlib with pygtk-2.4 and recent versions of gcc. It does not appear to be a matplotlib problem, and we've isolated a simple bit of c++ code (included below) that contains only standard c++ headers and a pygobject include, that exposes the problem.
I'll be glad to post a bugzilla report if this is indeed a bug. I thought it would be worthwhile to get some feedback here first. Thanks! JDH The error message is In file included from test.cpp:8: /usr/include/pygtk-2.0/pygobject.h:140: error: parse error before `typename' /usr/include/pygtk-2.0/pygobject.h:147: error: parse error before `typename' The test.cpp file #include <cstring> #include <cerrno> #include <cstdio> #include <iostream> #include <cmath> #include <utility> #include <pygobject.h> int main() { std::cout << "hello gtk" << std::cout; } The compile command is > g++ test.cpp `pkg-config --cflags pygtk-2.0` -I/usr/local/include/python2.3/ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include -I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.3 `pkg-config-c test.cpp `pkg-config [EMAIL PROTECTED]:~/Matplotlib$ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include -I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.3 `pkg-config pygtk-2.0` -c test.cpp In file included from /usr/include/python2.3/Python.h:8, from /usr/include/pygtk-2.0/pygobject.h:5, from test.cpp:8: /usr/include/python2.3/pyconfig.h:856:1: warning: "_POSIX_C_SOURCE" redefined In file included from /usr/include/string.h:26, from /usr/include/c++/3.3/cstring:51, from test.cpp:1: /usr/include/features.h:131:1: warning: this is the location of the previous definition In file included from test.cpp:8: /usr/include/pygtk-2.0/pygobject.h:140: error: parse error before `typename' /usr/include/pygtk-2.0/pygobject.h:147: error: parse error before `typename' gcc version info > gcc -v Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.5 (Debian 1:3.3.5-1) _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/