From: David F. <dav...@gm...> - 2011-06-26 12:13:23
|
> It now works. I suppose that not putting the %template > statement was the major culprit. I think too, as well as c.get_vector instead of bar.get_vector. > I'll try again with my full-scale project then. I remember > seeing a different error then... What I was trying to do was a tiny bit > different, in the sense that > the vector would contain objects that are already part of another package, > for which the python module already exists. >I will get back to this thread if I encounter other problems. I'm in the same situation, working on a full-scale project, witting some simplified example when needed. By coincidence, I opened yesterday a bug on the tracker, with a test case close to yours, but yielding to a side effect: http://sourceforge.net/tracker/?func=detail&aid=3331170&group_id=1645&atid=101645 >From your first mail: > What I am trying to do should be a very common task with SWIG, yet, I spent > the last two days googling around from help and I still can't find proper > indications on how to do this. I think there is a lack of material on the web for beginners (I'm a few months beginner), who want to use Swig to wrap C++ code into Python. I really believe that developing the Swig Wiki would be a good thing. I plan to write some pages about what I've learned, maybe in summer. There are a lot of resources in the swig sources, for example (pun) : swig-2.0.4/Examples/python. But I think than a lot a newcomers even don't know they exist, and that the Wiki could be a good place to shared experiences and a good complement to the official documentation. |