[C++-sig] Can't get Boost.Python to use extensions generated and wrapped with Py++

Roman Yakovenko roman.yakovenko at gmail.com
Tue Jul 17 20:14:37 CEST 2007


On 7/17/07, Lawrence Spector <Lawrence.Spector at canfieldsci.com> wrote:
> Ok, I've been playing with it some more, still not getting everything to work though.  I tried the things you said; it still wasn't working.  I took out the constructors from the python interface and added shared_ptr support.  I then pass the shared_ptr through.  It still doesn't work upon creating the object -- it throws an exception, saying that
there's no converter.


I am not sure why your code doesn't work, try to use
register_ptr_to_python functionality(
http://boost.org/libs/python/doc/v2/register_ptr_to_python.html )

Also did you try boost::ref and boost::python::ptr functionality?

I also suggest you to use google :-)

This is what I get when I searched for "boost.python share C++ instance"
http://wiki.python.org/moin/boost.python/EmbeddingPython

HTH
-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list