[C++-sig] [Py++] Undefined symbols for static const int member of class

2010-05-21 Thread Brian O'Kennedy
Hi, I'm wrapping a very simple class using PyPlusPlus. snip class testclass { public: static const int a = 99; }; /snip And Py++ exposes the static member with a def_readonly("a", testclass::a ) call. When I import this module into python I get an undefined symbol for

Re: [C++-sig] [Py++] Undefined symbols for static const int member of class

2010-05-21 Thread Roman Yakovenko
On Fri, May 21, 2010 at 1:05 PM, Brian O'Kennedy wrote: > Hi, > I'm wrapping a very simple class using PyPlusPlus. > snip >  class testclass >  { >   public: >    static const int a = 99; >  }; > /snip > And Py++ exposes the static member with a def_readonly("a", testclass::a )

Re: [C++-sig] [Py++] Undefined symbols for static const int member of class

2010-05-21 Thread Kun Hong
On 21/05/2010, at 8:05 PM, Brian O'Kennedy wrote: Hi, I'm wrapping a very simple class using PyPlusPlus. snip class testclass { public: static const int a = 99; }; /snip And Py++ exposes the static member with a def_readonly("a", testclass::a ) call. When I impo

Re: [C++-sig] [Py++] Undefined symbols for static const int member of class

2010-05-21 Thread Brian O'Kennedy
Hi Roman, Thanks for the reply - I've had a look at those unit tests, but were unable to reproduce the same results in my code. I get an error at import:  "AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only" How do I go about running the Py++ unit tests? As