[C++-sig] Re: to_python (by-value) converter

David Abrahams dave at boost-consulting.com
Fri Sep 12 13:55:26 CEST 2003


Simon Ouellet <simon.ouellet at orthosoft.ca> writes:

> but the test doesn't cover the feature I'm currently looking for.
>
> I modified the test to cover the conversion of a C++ object into a
> python::object and it doesn't work.
>
> I attached the diff that I made.
>
>
> I built the the modified embedding.cpp the same way
>
> When I ran it I got:
>
> TypeError: No to_python (by-value) converter found for C++ type:
> 10CppDerived

Well of course that fails; CppDerived isn't wrapped and nothing you've
done has informed Boost.Python about how to convert it to Python.

Try executing class_<CppDerived>("CppDerived"); before then.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list