|
Boost Users : |
From: Sergey Skorniakov (s.skorniakov_at_[hidden])
Date: 2007-09-06 04:20:42
> I tried putting all the serialization code into the header file but I still
> get the exact same runtime error. I don't think this should matter though
> unless I am including the header file for derived somewhere else.
My mistake - I didn't noticed that you don't include derived.hpp in main.
I am not familiar with gcc and *nux, but you should check that main and derived are linked to .so version of serialization library. Its necessary that all parts of programs use single instance of typeinfo registry (tkmap and ktmap from serialization/src/extended_type_info.cpp, and void_caster_registry from serialization/src/void_cast.cpp). Unfortunatelly, its not enough. On MS Windows, there are at two other issues related to dynamically loadable libraries - multiple registration of type in tkmap (it is indicated by assert) and problem with different tracking level of the same type in different executable modules. I'm not tested these problems on Linux, but guess that it should be similar.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net