
on Thu Oct 23 2008, "Hartmut Kaiser" <hartmut.kaiser-AT-gmail.com> wrote:
There should be one key_register and a matching key_unregister for each exported type. Since this is very hard to reproduce, could I ask you to spend a little time investigating why this seems not to be true in this case? I would hope that trapping on these two functions and watching what the arguments are might shed light on the mystery.
Ok, here is what I got. Everything suddenly starts to work as soon as there is at least one BOOST_CLASS_EXPORT() inside a shared library which is loaded at application startup (not loaded with dlopen()). But please don't ask me why, it's just good to know. Perhaps we're dealing with some idiosyncrasies of the dlopen() library in combination with gcc symbol visibility rules.
Do dynamic initializations of namespace scope objects occur when a library is loaded solely through dlopen? If not, that would explain it. -- Dave Abrahams BoostPro Computing http://www.boostpro.com