Boost Python Issue

Neal Becker ndbecker2 at gmail.com
Fri Sep 1 03:41:13 CEST 2006


JDJMSon wrote:

> 
> Neal Becker wrote:
> 
>> Shouldn't that be:
>> .def("TestFunction",&TestClass::TestFunction)
>> > ;
> 
> 
> Yes, you're right, but I'm still getting the error. I'm using a
> prebuilt python library, so later I'm going to rebuild python myself
> and see if that helps, as has been suggested.
> Thanks.
> 

I think you need an init.  Usually looks like:

class_< c++ class > ("python name", init<args..>())
.def ("python member", &class::member);




More information about the Python-list mailing list