在Eclipse中提升序列化链接错误

时间:2013-05-25 16:18:52

标签: c++ eclipse serialization boost

我正在使用Boost 1.53,我想序列化这个类。

serialize.h 文件指定:

class serialize
{
   private: 
       map<int, Test*> testMap;
}

serialize.cpp 文件指定:

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

Test.h 文件指定:

using namespace boost;

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

将以下错误链接到:

  

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

请告诉我有什么问题!!!

0 个答案:

没有答案