I'm trying to compile a slim wxpython to embed in an application. I configured wx with:
--enable-debug_flag --disable-debug_info
(the python exceptions thing sounded useful, I just don't want the debug symbols bloating the libraries)
And the wxpython setup.py picks that up from wx-config. I verified that both are compiling with -D__WXDEBUG__.
When running the wx-based application (pure python at this point), I get:
Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and wxPython used 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers).
The only difference I see is the 2.6 comptibility. I didn't see a 2.6 compatibility option for the wxpython setup.py.
If I build wx without 2.6 compatibility, wxpython fails to compile:
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_IODBC_ -D__WXDEBUG__ -D__WXMAC__ -Iinclude -Isrc -I/Users/Shared/unix/wxpython-leo/lib/wx/include/mac-unicode-debug-2.8 -I/Users/Shared/unix/wxpython-leo/include/wx-2.8 -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/mac/_core_wrap.cpp -o build.unicode/temp.macosx-10.5-i386-2.5/src/mac/_core_wrap.o -O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
src/mac/_core_wrap.cpp: In function ‘bool wxSizer_Remove(wxSizer*, PyObject*)’:
src/mac/_core_wrap.cpp:4652: error: invalid conversion from ‘wxWindow*’ to ‘int’src/mac/_core_wrap.cpp: In function ‘bool wxSizer_Remove(wxSizer*, PyObject*)’:
src/mac/_core_wrap.cpp:4652: error: invalid conversion from ‘wxWindow*’ to ‘int’
src/mac/_core_wrap.cpp:4652: error: initializing argument 1 of ‘virtual bool wxSizer::Remove(int)’
src/mac/_core_wrap.cpp:4652: error: initializing argument 1 of ‘virtual bool wxSizer::Remove(int)’
src/mac/_core_wrap.cpp: In function ‘PyObject* _wrap_GetAccelFromString(PyObject*, PyObject*, PyObject*)’:
src/mac/_core_wrap.cpp:33817: error: ‘wxGetAccelFromString’ was not declared in this scope
src/mac/_core_wrap.cpp: In function ‘PyObject* _wrap_GetAccelFromString(PyObject*, PyObject*, PyObject*)’:
src/mac/_core_wrap.cpp:33817: error: ‘wxGetAccelFromString’ was not declared in this scope
src/mac/_core_wrap.cpp: In function ‘void init_core_()’:
src/mac/_core_wrap.cpp:63781: error: ‘wxPROCESS_ENTER’ was not declared in this scope
src/mac/_core_wrap.cpp:63782: error: ‘wxPASSWORD’ was not declared in this scope
src/mac/_core_wrap.cpp:64083: error: ‘WXK_PRIOR’ was not declared in this scope
src/mac/_core_wrap.cpp:64084: error: ‘WXK_NEXT’ was not declared in this scope
src/mac/_core_wrap.cpp:64153: error: ‘WXK_NUMPAD_PRIOR’ was not declared in this scope
src/mac/_core_wrap.cpp:64155: error: ‘WXK_NUMPAD_NEXT’ was not declared in this scope
src/mac/_core_wrap.cpp: In function ‘void init_core_()’:
src/mac/_core_wrap.cpp:63781: error: ‘wxPROCESS_ENTER’ was not declared in this scope
src/mac/_core_wrap.cpp:63782: error: ‘wxPASSWORD’ was not declared in this scope
src/mac/_core_wrap.cpp:64083: error: ‘WXK_PRIOR’ was not declared in this scope
src/mac/_core_wrap.cpp:64084: error: ‘WXK_NEXT’ was not declared in this scope
src/mac/_core_wrap.cpp:64153: error: ‘WXK_NUMPAD_PRIOR’ was not declared in this scope
src/mac/_core_wrap.cpp:64155: error: ‘WXK_NUMPAD_NEXT’ was not declared in this scope
So it seems like 2.6 compatibility is a requirement for wxpython, though it's not mentioned in the documentation.
Finally, building wx and wxpython without any debug flags at all, no complaints, the app runs.
···
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Earth: "Mostly harmless"
- revised entry in the HitchHiker's Guide to the Galaxy