
martin.ecker@tab.at wrote:
Hello,
Russell Hind wrote:
I have successfully built serialization as dlls under bcc32 by duplicating the two 'lib' sections in the JamFile and renaming them to dll and then adding the <dll>libboost_serialization and <dll>libboost_wserialization to the install and stage sections.
Unfortunately, simply building boost::serialization as DLL under Windows is not enough because the extended RTTI objects for a class are duplicated in each module/DLL. This is because the static extended type info instances are defined in header files, and under Windows this will cause an instance to be created for each module that includes that header file.
This effectively means that serializing a class defined in one DLL from another DLL will not work properly. I've made some changes to boost::serialization that allow DLL builds and allow using the library with modules/DLLs (even when they are explicitly loaded/unloaded multiple times), but these changes have not yet made it into CVS.
Thanks! I suggest support for building shared libs even without the changes, because from my limited testing, it will work on some systems. (Don't penalize working systems because some others don't work)