Take the 2-minute tour ×

I'm using Boost 1.53, I want to serialize the class.

The serialize.h file specifies:

class serialize
       map<int, Test*> testMap;

The serialize.cpp file specifies:

void main()
    ofstream ofs(xxx/xxxx);
        archive::binary_oarchive oar(ofs);
        oar << serialization::make_nvp("test", testMap);

The Test.h file specifies:

using namespace boost;

class Test
    friend class serialization::access;
    template <class Archive>
    void serialize(Archive& archive, unsigned int version)
        archive & value;
    int value;

Link the following error in:

boost::serialization::typeid_system::extended_type_info_typeid_0::is_less_than(boost::serialization::extended_type_info const&) const:libs/serialization/src/extended_type_info_typeid.cpp:56: error: undefined reference to 'std::type_info::before(std::type_info const&) const'

Please tell me what is wrong !!!

share|improve this question
You may want to swap your public and private specifiers in your "Test" class. Using the name "serialize" for one of your classes isn't good enough. Sorry I can't be of more help. It isn't clear to me what you want to accomplish. –  wood_brian May 25 '13 at 18:13
I want to serialize as binary "Test class" in "serialize.cpp". I'm sorry, and you sure you want if you provide what information. –  user1785325 May 26 '13 at 1:10
add comment


Your Answer



Browse other questions tagged or ask your own question.