[C++-sig] undefined symbols with def_readonly
Stefan Seefeld
seefeld at sympatico.ca
Thu Apr 10 15:07:57 CEST 2008
Neal Becker wrote:
>>> class_<turbo_enc_1_15> ("turbo_enc_1_15", no_init)
>>> ...
>>> .def_readonly ("TAIL_BITS", &turbo_enc_1_15::TAIL_BITS)
[...]
> Yes, I just want to get the (compile-time evaluated) value. What is the
> suggested way to do this?
Try
.def_readonly ("TAIL_BITS", turbo_enc_1_15::TAIL_BITS)
(i.e. without the address-of operator). If that doesn't work, simply set
a raw attribute:
.setattr ("TAIL_BITS", turbo_enc_1_15::TAIL_BITS)
HTH,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list