Boost logo

Boost Users :

From: Florian Preknya (mata_at_[hidden])
Date: 2004-12-08 04:05:34


Hello,
I am trying to use the boost serialization library to serialize the
classes from my application (I use Microsoft Visual C++ 7.1 compiler).
The most of the classes are placed in a DLL, some are in my executable
project. For this, I had to link (statically) the DLL and the executable
with boost serialization library. I used the BOOST_CLASS_EXPORT macro
for all the derived classes that I serialize through a base class
pointer: in each header, after the class declaration, I added the
BOOST_CLASS_EXPORT(class_name) line.

The DLL and executable compilation time increased drastically, and both
the DLL and the executable export tables contain all the entities
(classes & functions) resulted from the BOOST_CLASS_EXPORT macro
expansion (and because the BOOST_DLLEXPORT is defined as
__declspec(dllexport) in force_include.hpp). This happens because I have
to include the header files from the DLL source files, also from the
executable project source files.
My question is: where should I put the BOOST_CLASS_EXPORT declarations
for the DLL classes? Note that I invoke the
serialization/deserialization only from the executable (not from the
DLL). I tried to group all the BOOST_CLASS_EXPORT declarations in a cpp
file in the executable project. It went pretty good, but after inserting
many declarations, I received the C1204 error (internal structure
overflow).
Are there "things to know" for using the serialization library from a
DLL? Also, there are no test projects that cover this aspect.

Thanks a lot,
Florian Preknya


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