Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Restoring from text archive compile error
From: Dante Stroe (dante.stroe_at_[hidden])
Date: 2010-06-25 08:46:19


Nope, I did miss that but that didn't fix it, I still get the same
compilation errors.

On 06/25/2010 02:36 PM, Jeff Flinn wrote:
> Dante Stroe wrote:
>> Hello,
>>
>> I am currently trying to serialize the classes of a project I am
>> working on, but I ran into a few compliation errors and I am kind of
>> stuck, so I was hoping somebody here could help me on that.
>> I am using the 1.43 version of the boost library and gcc 4.4.1. (I'd
>> like to add that all the examples in and tutorials from the
>> documentation work fine for me).
>> I am trying to serialize a base class called "base" and it's derived
>> class called "de" that use a shared pointer, and afterwards test my
>> implementation by saving the an instance of a "de" object into a text
>> archive and then restoring it.
>>
>> These is the serialization implementation for my two classes for
>> reference:
>>
>> ---"base.h"-----
>> #include<iostream>
>> #include<string>
>> #include<typeinfo>
>> #include "../config.h"
>> #include "../population.h"
>> #include "../rng.h"
>> #include<boost/shared_ptr.hpp>
>> #include<boost/archive/text_iarchive.hpp>
>> #include<boost/archive/text_oarchive.hpp>
>> #include<boost/serialization/version.hpp>
>> #include<boost/serialization/base_object.hpp>
>
> try adding:
>
> #include<boost/serialization/shared_ptr.hpp>
>
> I didn't look at any other errors, but this is the obvious ommision.
>
> Jeff
>
> Jeff
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net