On 5/22/06, Neal Becker <ndb...@gm...> wrote:
> hello_world.hpp:
> --------------
> struct A {};
>
> struct B {
> A& a;
> };
>
> --------------
>
> run through pygccxml produces:
> // This file has been generated by pyplusplus.
>
> #include "boost/python.hpp"
>
> #include "/home/nbecker/tmp/hello_world.hpp"
>
> namespace bp =3D boost::python;
>
> BOOST_PYTHON_MODULE(hw){
> bp::class_< B, boost::noncopyable >( "B", bp::no_init )
> .def_readonly( "a", &B::a );
>
> bp::class_< A >( "A" );
> }
>
> But this doesn't compile:
> g++ -I /usr/include/python2.4 -I /usr/local/src/boost.cvs hello_world.py.=
cpp
> hello_world.py.cpp: In function 'void init_module_hw()':
> hello_world.py.cpp:11: error: cannot create pointer to reference member '=
B::a'
I will fix it in a day or too. I will let you know, okay?
Thanks for bug reporting.
--=20
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|