Boost logo

Boost :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2004-10-18 18:06:19

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

It is impossible to use serialization with boost::python without shared

Boost list run by bdawes at, gregod at, cpdaniel at, john at