Boost.Serialization type-dependent serialization

Hi! I have a list of objects of the following structure:
class Obj { // a number simple fields int field1() const;
// ...
// reference to an object containing large amount of data const blob_type & mega_blob() const; };
The list is to be serialized in the following way: 1) simple fields of each object are to be serialized into a single xml file; 2) mega_blobs' are to be serialized into separate binary files. The idea of doing it is to write custom archive that has operator<< specialized for blob_type which does the magic. Following the Boost.Serialization reference (http://www.boost.org/doc/libs/1_52_0/libs/serialization/doc/archive_referenc...), I wrote the code in order to proof the concept: http://pastebin.com/ekbXXvxF My test project is built using CMake and G++-4.6.3 (Debian Wheezy) (that seems to be ok - other code that uses Boost.Serialization compiles well): http://pastebin.com/WVRUKLD2 As a result I get the following linker errors: http://pastebin.com/rM05nkqw The questions: 1) am I using xml_oarchive_impl wrong way or that problem is not boost-related? 2) maybe there are more elegant ways of solving my task? Cheers, Suvorov Roman.

Compilation errors are overcome when the following lines were included:
#include
participants (1)
-
Roman Suvorov