Source Compiling Error...

Hello, everyone.

I am getting the following error while compiling wxPython.

cc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -O2 -DGLX_GLXEXT_LEGACY
-I/usr/pkg/include -I/usr/X11R6/include -DGLX_GLXEXT_LEGACY
-I/usr/pkg/include -I/usr/X11R6/include -fPIC -DSWIG_GLOBAL
-DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -Isrc
-I/usr/pkg/include/python2p2 -c src/gtk/windows.cpp -o
build/temp.netbsd-1.6.1-i386-2p2/src/gtk/windows.o
-I/usr/pkg/lib/wx/include/gtk-2.4 -I/usr/pkg/include -DGTK_NO_CHECK_CASTS
-D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-I/usr/X11R6/include/gtk-1.2 -I/usr/pkg/include/glib/glib-1.2
-I/usr/pkg/lib/glib/include -I/usr/X11R6/include

src/gtk/windows.cpp: In function `struct PyObject * _wrap_wxMenuItem_SetMenu(PyObject *, PyObject *, PyObject *)':
src/gtk/windows.cpp:10728: no matching function for call to `wxMenuItem::SetMenu (wxMenu *&)'

The funny thing is that windows.cpp only has some 46k lines of code, but
the error occus at line 10728.

Can anyone help with this? Any comments/suggestions would be greatly
appreciated. Thanks in advance!

sincerely,
  Yosep

Yosep wrote:

Hello, everyone.

I am getting the following error while compiling wxPython.

cc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -O2 -DGLX_GLXEXT_LEGACY
-I/usr/pkg/include -I/usr/X11R6/include -DGLX_GLXEXT_LEGACY
-I/usr/pkg/include -I/usr/X11R6/include -fPIC -DSWIG_GLOBAL
-DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -Isrc
-I/usr/pkg/include/python2p2 -c src/gtk/windows.cpp -o
build/temp.netbsd-1.6.1-i386-2p2/src/gtk/windows.o
-I/usr/pkg/lib/wx/include/gtk-2.4 -I/usr/pkg/include -DGTK_NO_CHECK_CASTS
-D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-I/usr/X11R6/include/gtk-1.2 -I/usr/pkg/include/glib/glib-1.2
-I/usr/pkg/lib/glib/include -I/usr/X11R6/include

src/gtk/windows.cpp: In function `struct PyObject * _wrap_wxMenuItem_SetMenu(PyObject *, PyObject *, PyObject *)':
src/gtk/windows.cpp:10728: no matching function for call to `wxMenuItem::SetMenu (wxMenu *&)'

The funny thing is that windows.cpp only has some 46k lines of code, but
the error occus at line 10728.

Can anyone help with this? Any comments/suggestions would be greatly
appreciated. Thanks in advance!

You need to use the wxGTK that is in the wxPythonSrc 2.4.1.2 tarball, not the official wxGTK 2.4.1 version. I added a wrapper for SetMenu as I thought it had been added just before 2.4.1 was done but it turned out it was just after.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!