[C++-sig] Calling python virtual function from C++

David Abrahams dave at boostpro.com
Wed Jan 28 22:27:33 CET 2009

on Wed Jan 28 2009, William Marié <william.marie-AT-gmail.com> wrote:

> I need to call my testVirtualPure function from C++ side : 
> BaseCmp* bc = BaseCmp();
> Base* b = Base();
> b->testVirtualPure( bc );
> But this causes an error : 
> TypeError: No to_python (by-value) converter found for C++ type: class
> BaseCmp

The above doesn't compile, so you can't possibly be getting that
TypeError from it.  Please post the exact complete, reproducible example
that causes youi problems, after reducing it to a minimal test case.

Dave Abrahams
BoostPro Computing

More information about the Cplusplus-sig mailing list