getting swig + wxPython working well...
Hi, I'm trying to extend wxPython with C++, and when I run swig on my .i file,
it tells me it doesn't know what a wxWindow is, and it's ignoring it.
How can I get my C++ extensions working well? Can I use the latest swig instead?
I'm using Robin's wxPython-2.6.1.0 libs+includes, and a 1.3.24 version of swig +
Robin's patches.
I might not have the patches applied correctly, but looking at what the patches
fix (making copies of objects that don't have a copy constructor, etc.) it
doesn't look like it would make any difference.
···
-----------------------------------------------
Here's my .i:
%{
#include "wx/wxPython/wxPython.h"
#include "imaging/big/tileCache.h"
#include "tracing/neuroinfo/VisibleArea.h"
#include "imaging/wx/imageNavigator.h"
#include "imaging/wx/slideWindowOverlay.h"
%}
%import typemaps.i
%import my_typemaps.i
%pragma(python) code = "import wx"
class SlideWindow: public wxWindow, public ImageNavigatorListener
{
public:
SlideWindow(wxWindow *parent);
...
-----------------------------------------------
and Here's how I'm invoking swig from visual studio:
c:\jimc\prj\bright\tools\swig -c++ -python
-IC:\jimc\prj\bright\libs\wxPython-2.6.1.0\include\wx\wxPython\i_files -o
$(ProjectDir)\gen\$(InputName)_wrap.cpp "$(InputPath)"
-----------------------------------------------
And here's my output:
c:\jimc\prj\bright\src\imaging\wx\slideWindow.i(26): Warning(401): Nothing known
about base class 'wxWindow'. Ignored.
c:\jimc\prj\bright\src\imaging\wx\macroWindow.i(25): Warning(401): Nothing known
about base class 'wxWindow'. Ignored.
Thanks!
-Jim