
18 Oct
2004
18 Oct
'04
11:06 p.m.
I brought up the topic that int the current cvs serialization libs are only built static, not shared. The reason for this is that the library uses this construct: ,----[ /home/nbecker/stuff/A.hpp ] | // {{{ struct A | | struct A { | int i; | A() { i = 1; } | static const A instance; | }; | | // }}} | | extern const A A::instance = A(); `---- If this is included into 2 shared libraries, will A::instance be shared? I have tested this on Linux. If you dlopen 2 different shared libs, it will work correctly, if you set the flags RTLD_NOW|RTLD_GLOBAL. Since this will work correctly on some systems, I would like to see this supported. It is impossible to use serialization with boost::python without shared libs.