what does this message mean?
Can somebody explain why this message occurs? aclass.MyFunction(object1, object2) did not match C++ signature: MyFunction(class A{lvalue}, class boost::shared_ptr<B> >) I get the error when object2 is a python class that implements the interface specified by B. class Object2Class(B): def(self): self.something def functionFromB(self): # do something here What is the correct way of passing this kind of object to C++? Any help will be greatly appreciated. Thanks, Alexis Programming Tutorial: In Python: To do this, do this In Perl: To do this, do this or this or this or this... In C: To do this, do this, but be careful In C++: To do this, do this, but don't do this, be careful of this, watch out for this, and whatever you do, don't do this __________________________________ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail
"Alexis H. Rivera-Rios" <ahrivera@yahoo.com> writes:
Can somebody explain why this message occurs?
aclass.MyFunction(object1, object2) did not match C++ signature: MyFunction(class A{lvalue}, class boost::shared_ptr<B> >)
That's not the actual message, is it? The first line looks specific.
I get the error when object2 is a python class that implements the interface specified by B.
the problem is that you're calling a C++ function. "Implements the interface" isn't enough; it needs to be an instance of the Python class that wraps B, and its __init__ function needs to have been called to initialize the contained C++ B object. IOW, there has to be a real, C++ B object there. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
Alexis H. Rivera-Rios -
David Abrahams