|
From: Jim C. <mr...@gm...> - 2006-11-20 09:44:58
|
Hi Graham,
> I am writing a Python script that uses wxPython. I would
> like to call a C++ function that takes a wxImage as its
> parameter. However, when I do, I get an error:
> TypeError: in method 'func', argument 1 of type 'wxImage *'
The good news is that it's possible, and very rewarding once you get
it working. The bad news is that it's gonna take a few hours to get
everything set up. Robin does have the exact version of SWIG that he
used in a download somewhere... you don't have to build it.
First thing is to use swig 1.3.27, plus some patches that are in the
wxWidgets source.
Here's my write-up of how I did it with Visual Studio. On the mailing
list there's a setuptools method too...
http://wiki.wxpython.org/index.cgi/VisualStudioExtensions
-Jim
On 11/20/06, Graham Menhennitt <Gra...@in...> wrote:
> I am writing a Python script that uses wxPython. I would like to call a C++ function that takes a wxImage as its parameter. However, when I do, I get an error:
> TypeError: in method 'func', argument 1 of type 'wxImage *'
>
> My interface is defined as:
>
> %module func
> %{
> #include "func.h"
> %}
> unsigned long func(wxImage* image);
>
> and the C++ code has the same function definition.
>
> wxWidgets and wxPython are version 2.6.3. SWIG is version 1.3.29. The compiler is Micrososft Visual Studio 2005.
>
> Can somebody please tell me how to do this?
>
> Thanks in advance for your help,
> Graham
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Swig-user mailing list
> Swi...@li...
> https://lists.sourceforge.net/lists/listinfo/swig-user
>
>
|