|
Boost : |
From: David GD Wilson (firestar_at_[hidden])
Date: 2002-04-07 08:34:21
Hi,
I am trying to export a C++ class (CVector) defined in a boost.python
module to use in another boost.python module, however I get the compile
error:
c:\sdk\boost_1_27_0\boost\python\cross_module.hpp(215): error C2665:
'boost::python::from_python' : none of the 59 overloads can convert
parameter 2 from type 'boost::python::type<T>'
with
[
T=boost::shared_ptr<CVector> &
]
Is this a bug in the boost python implementation? This compiles fine
under linux, using gcc.
The code exporting CVector is:
// Create an object representing this extension module.
module_builder core_module( "core" );
// CVector definition
class_builder< CVector > vector_class( core_module, "CVector" );
// Add the __init__ function
vector_class.def( constructor<>() );
vector_class.def( constructor< float, float, float >() );
// Add readable/writable member variable
vector_class.def_read_write( &CVector::x, "x" );
vector_class.def_read_write( &CVector::y, "y" );
vector_class.def_read_write( &CVector::z, "z" );
export_converters( vector_class );
Any help would be appreciated!
David
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk