Original Post
Hi, I have a static variable in my struct which I am trying to expose to python using boost.python
class y {
...
};
struct x {
int a;
static y b;
};
...
class_<x>("x")
.def_readonly("b", make_getter(&x::b, return_value_policy<reference_existing_object>() ))
class_<y>("y")
...
this code compiles in gcc. But when the dynamic lib is imported in python, it reports an import error related to this static variable as "undefined symbol " with crazy syntaxed x.b (_ZN6x2bE ) Can anyone tell me how I can expose a static class member without any problem !!