Hi all,
I tried to upgrade my application to the new version of wxPython but ran into the following problems:
I'm building wxPython version 2.7.1.2 using --with-gtk=1, --with-opengl, --enable-geometry, --enable-display, and --disable-debugreport as options to configure. I am building on Mac OS X 10.4.8 using gcc 4.0.1 (and gtk-1.2 installed via Fink)
While building the wxWidgets part I had to apply the following patches to get things to compile:
···
====================
--- wxPython-src-2.7.1.2-old/src/gtk1/utilsgtk.cpp 2006-08-18 01:28:46.000000000 +0200
+++ wxPython-src-2.7.1.2/src/gtk1/utilsgtk.cpp 2006-10-24 13:15:56.000000000 +0200
@@ -196,3 +196,8 @@
return wxPORT_GTK;
}
+
+wxString wxGUIAppTraits::GetDesktopEnvironment() const
+{
+ return wxEmptyString;
+}
--- wxPython-src-2.7.1.2-old/src/mac/corefoundation/stdpaths_cf.cpp 2006-07-05 20:37:00.000000000 +0200
+++ wxPython-src-2.7.1.2/src/mac/corefoundation/stdpaths_cf.cpp 2006-10-24 12:06:09.000000000 +0200
@@ -31,7 +31,6 @@ #include "wx/mac/private.h"
#endif #include "wx/mac/corefoundation/cfstring.h"
-#include "wx/mac/private.h"
#if defined(__DARWIN__)
#include <CoreFoundation/CFBundle.h>
After installing wxWidgets I tried to build wxPython using Python 2.4.4 with
python setup.py WXPORT=gtk WX_CONFIG=$(mywxpythonpath)/bin/wx-config install --prefix=$(mywxpythonpath)
This produced the following error when trying to compile helpers.cpp:
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
src/helpers.cpp:32:28: error: wx/gtk/win_gtk.h: No such file or directory
src/helpers.cpp: In function 'long int wxPyGetWinHandle(wxWindow*)':
src/helpers.cpp:1841: error: 'GTK_PIZZA' was not declared in this scope
error: command 'gcc' failed with exit status 1
It seems that for Gtk 1.2 the directory include/wx/gtk has been renamed to include/wx/gtk1. I did provide a WXPORT=gtk, so I assume it is a bug that wxPython is not looking in include/wx/gtk1 for the win_gtk.h file.
I just made a temporary symbolic link from this gtk1 subdirectory (named include/wx/gtk) and tried to see how much further I could get.
The next problem occurred when trying to compile _core_wrap.o:
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
src/gtk/_core_wrap.cpp: In function 'PyObject* _wrap_GetAccelFromString(PyObject*, PyObject*, PyObject*)':
src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is deprecated (declared at /Users/sander/Projects/wxpython/include/wx-2.7/wx/utils.h:571)
src/gtk/_core_wrap.cpp:30339: warning: 'wxGetAccelFromString' is deprecated (declared at /Users/sander/Projects/wxpython/include/wx-2.7/wx/utils.h:571)
src/gtk/_core_wrap.cpp: In function 'PyObject* _wrap_Window_SetDoubleBuffered(PyObject*, PyObject*, PyObject*)':
src/gtk/_core_wrap.cpp:34445: error: 'class wxWindow' has no member named 'SetDoubleBuffered'
At this point I am lost. Could someone please help me get this thing build?
Best regards,
Sander Niemeijer