Robert Ramey wrote:
Deane Yang wrote:
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:
Where did you find this in the documentation? I know its in there but I can't find it when I look for it in the HEAD.
Reference -> Special Considerations -> Exporting Class Serialization (at the very end)
In fact, my implementation file contains *only* BOOST_CLASS_EXPORT statements.
Then no code will be instantiated - as you have indeed found.
What else is supposed to be in this file? Do I need to put in the code that loads and saves archives in this file?
Code like this seems to compile only if I also include archive headers like: #include
#include correct.
If these directives are omitted, then my code does not compile.
Hmmm - the required code to export class x to archive xml_?archive.hpp will not be instantiated. I would expect that to show up as a missing symbol during linking.
No, I get something like: ..\..\..\..\vendor\boost\boost/serialization/type_info_implementation.hpp(48) : error C2027: use of undefined type 'boost::serialization::extended_type_info_impl<T>' with [ T=Input::Bond ] ..\..\..\..\vendor\boost\boost/serialization/export.hpp(75) : see reference to class template instantiation 'boost::serialization::type_info_implementation<T>' being compiled with [ T=Input::Bond ]
Send me a little code that reproduces the problem.
I'll see if I can reproduce my error with a simple example. Thanks! Deane