-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Robert Ramey Sent: Thursday, April 26, 2007 9:06 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Serialization] Multiple BOOST_CLASS_EXPORT
This has caused problems in the past. I believe that the code checked into the current HEAD branch of the CVS tree addresses this, but I havn't been able to test it.
My intention was the BOOST_CLASS_EXPORT would be included in the *.h file for the class.
If you have BOOST_CLASS_EXPORT in a header file, doesn't that cause the same problems? If this is what your checkins would fix, then that's understandable. However, this still doesn't help with class templates since you can't know ahead of time what parameters to instantiate the templates with.
My recommendation is to make a library which instantiates all your classes's serialize functions with all the archives you're going to use. Then link against this library.
I am starting to lean towards centralizing all the serialization logic rather than having it local to the relevant classes as you suggest. I prefer locality for obvious reasons. But maybe such a cross-cutting concern should be in a single place. Any thoughts (from serialization users even?) Thanks, Sohail