$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Deane Yang (deane_yang_at_[hidden])
Date: 2006-11-22 23:52:09
First, I am trying to figure out how to use BOOST_CLASS_EXPORT. I am 
trying to do it using the following advice from the documentation:
"As noted in the comments, this would work. But #include 
<.../export.hpp> can't be used without conflicting with other modules 
which use #include <.../*archive.hpp>. In this case we can move the 
export to an implementation file:
// A.cpp
#include "A.hpp"
...
// export.hpp header should be last;
#include <boost/serialization/export.hpp>
...
BOOST_CLASS_EXPORT(A)
..."
In fact, my implementation file contains *only* BOOST_CLASS_EXPORT 
statements.
Code like this seems to compile only if I also include archive headers like:
#include <boost/archive/xml_oarchive.hpp>
#include <boost/archive/xml_iarchive.hpp>
If these directives are omitted, then my code does not compile.
Is this correct? (I didn't see anything about this in the documentation)
But now if a class that is being exported contains a 
boost::shared_ptr<..> member (so I have to #include 
boost/serialization/shared_ptr.hpp), then I get the following 
compilation errors (in MSVC8.0express):
..\..\..\vendor\boost\boost/serialization/shared_ptr.hpp(134) : error 
C2039: 'reset' : is not a member of 'boost::archive::naked_xml_iarchive'
         ..\..\..\vendor\boost\boost/archive/xml_iarchive.hpp(91) : see 
declaration of 'boost::archive::naked_xml_iarchive'
         ..\..\..\vendor\boost\boost/serialization/split_free.hpp(58) : 
see reference to function template instantiation 'void 
boost::serialization::load<Archive,AndrewKalotayAssociates::Basic::Output::ValuationReport>(Archive 
&,boost::shared_ptr<T> &,const unsigned int)' being compiled
Can someone tell from this what I'm doing wrong?