$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Thomas Voigt (spock_at_[hidden])
Date: 2008-06-09 18:39:09
Hi,
I tried to use boost serializing for a std::set. The serializing itself 
works fine, however, after implementing the serialization the compiler 
started to generate a .exp and a .lib file, even though the application 
is no DLL.
Since the application is large and generating those files takes some 
time I tracked down the reason, and was surprised to realize that it was 
the serialization that triggered it. More precisely, the .lib and .exp 
will be generated if (and only if) I include the 4 lines of code calling 
the serialization.
Any ideas? Boost version is 1.35, Visual Studio 2005 english SP1 on WinXP.
Here is the sample (the part that loads the data, the writing part is 
symmetric):
--------------------------
         std::istringstream iss(serialized_string);
#ifdef SERIALIZE
         boost::archive::text_iarchive ia(iss);
         ia >> *myclass;
#endif
--------------------------
where myclass is a shared pointer to a class that looks basically like this:
-----------------------
class foo {
         std::set<SomeClass> _members;
         std::string _name;
         template<class Archive>
         void serialize(Archive& ar, const unsigned int version)
             { ar & _name; ar & _members; }
}
---------------------------
with a custom serialization routine for SomeClass.
Any help is appreciated. If there is a mailing list better suited for 
this discussion then please point me there, I'm new here  :-)
Regards, Thomas