Bill Lear wrote:
I am having some trouble understanding just where I am supposed to put BOOST_CLASS_EXPORT macros for classes I write --- in class headers (.h), in class implementation files (.cc), in applications that plan to save/load through base pointers?
The whole concept behind BOOST_CLASS_EXPORT has been problematic for me for
a couple of reasons. As a result, the confusion you cite is a real one.
My intention was that:
a) BOOST_CLASS_EXPORT be part of the header file for a particular class.
b) A typical program would look like:
#include
I have base class B, from which I derive lots of classes. I tried putting the BOOST_CLASS_EXPORT in the header files of each class, but soon found that this resulted in link-time errors due to multiple definitions.
I'll look into this. It might be fixable. It was my intention to permit this. Note that including BOOST_CLASS_EXPORT to programs which don't in fact serialize through a base class pointer may instanciate code that is in fact never called. I'll look into this as well. Robert Ramey