[C++-sig] a boost.python question about parameter that is a pointer of instance.

simon zhang hapopen at gmail.com
Sat Nov 17 18:11:56 CET 2012


I have write more code.what  documentation? http://www.boost.org/? Looks
some confused.I have not found the description of this problem.

BOOST_PYTHON_MODULE(ctopython)
{
    using namespace boost::python;
    class_<Rectangle> ("Rectangle")
        .def("area",&Rectangle::area)
    ;
    def("runtest",runtest);
}

2012/11/18 simon zhang <hapopen at gmail.com>

> yes..I try it..
> Error:undefined symbol:_ZRI9Rectangle
>
> 2012/11/17 Sybren A. Stüvel <sybren at stuvel.eu>
>
>>
>> On 17 November 2012 16:46, simon zhang <hapopen at gmail.com> wrote:
>>
>>> > func( &rt );
>>> How to make a parameter of c++ instance's pointer to a python function.
>>>
>>> > def pfunc( ret )
>>> >     print ret.long
>>> >     print ret.area()
>>> How to use c++ instance in python code.
>>>  parameter
>>>
>>
>> Have you tried what you coded already? Did it give you any error
>> messages? There is a lot of documentation out there (although not all of it
>> equally clear) , have you tried that?
>>
>> --
>> Sybren A. Stüvel
>>
>> http://stuvel.eu/
>>
>>
>>
>> _______________________________________________
>> Cplusplus-sig mailing list
>> Cplusplus-sig at python.org
>> http://mail.python.org/mailman/listinfo/cplusplus-sig
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20121118/bdf773a5/attachment.html>


More information about the Cplusplus-sig mailing list