Re: [serialization] compile error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [serialization] compile error

Scott-94
>Try removing the line
>
>> #include <boost/serialization/type_info_implementation.hpp>
>
>And let me know that happens.
>
>I believe this problem is a remnant of a header depency issue which will be
addressed in
> the next release.
>
>Robert Ramey

Thanks for the response.  I actually didn't have that #include in my
original code.  I added it in a futile attempt to see if that would fix the
issue.  I still see the same compile errors when I remove that #include
line.

Scott

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization] compile error

Robert Ramey
I compiled the following program wiht no errors on my vc 7.1 system with no
errors or warnings

Robert Ramey

#include <fstream>

#include <boost/archive/text_oarchive.hpp>

#include <boost/archive/text_iarchive.hpp>

#include <boost/serialization/base_object.hpp>

#include <boost/serialization/utility.hpp>

class gps_position

{

friend std::ostream & operator<<(std::ostream &os, const gps_position &gp);

friend class boost::serialization::access;

int degrees;

int minutes;

float seconds;

template<class Archive>

void serialize(Archive & ar, const unsigned int /* file_version */){

ar & degrees & minutes & seconds;

}

public:

// every serializable class needs a constructor

gps_position(){};

gps_position(int _d, int _m, float _s) :

degrees(_d), minutes(_m), seconds(_s)

{}

};

void save(const std::string & filename)

{

//boost::recursive_mutex::scoped_lock lock(_nodeMutex);

std::ofstream outFile;

outFile.open(filename.c_str(), std::ios::binary);

boost::archive::text_oarchive archiveFile(outFile);

// simple test

const gps_position g;

archiveFile << g;

outFile.close();

}



Robert Ramey



cheesy4poofs wrote:

>> Try removing the line
>>
>>> #include <boost/serialization/type_info_implementation.hpp>
>>
>> And let me know that happens.
>>
>> I believe this problem is a remnant of a header depency issue which
>> will be addressed in the next release.
>>
>> Robert Ramey
>
> Thanks for the response.  I actually didn't have that #include in my
> original code.  I added it in a futile attempt to see if that would
> fix the issue.  I still see the same compile errors when I remove
> that #include line.
>
> Scott



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization] compile error

Scott-94
In reply to this post by Scott-94
> I compiled the following program wiht no errors on my vc 7.1
> system with no errors or warnings
>
> Robert Ramey


I finally solved my problem by commenting out the following include:

//#include <boost/serialization/base_object.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/serialization/map.hpp>

Not sure why it solved it, but I'm glad at least to have put this behind me.
Thanks for the help.

Scott

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization] compile error

Robert Ramey
There is a left over header dependency which is fixed but will only show
in in 1.34.  until then base_object.hpp should be included afer
text_archive.hpp.

Sorry about that.

Robert Ramey


cheesy4poofs wrote:

>> I compiled the following program wiht no errors on my vc 7.1
>> system with no errors or warnings
>>
>> Robert Ramey
>
>
> I finally solved my problem by commenting out the following include:
>
> //#include <boost/serialization/base_object.hpp>
> #include <boost/archive/text_iarchive.hpp>
> #include <boost/archive/text_oarchive.hpp>
> #include <boost/serialization/map.hpp>
>
> Not sure why it solved it, but I'm glad at least to have put this
> behind me. Thanks for the help.
>
> Scott



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [serialization] compile error

sui tam
Hi,
       I still get an error :
 
        base_object.hpp(124): error expected either a definition or a tag name.
                     struct reg{
                              ^
       with the Intel 7.1 compiler

Robert Ramey <[hidden email]> wrote:
There is a left over header dependency which is fixed but will only show
in in 1.34. until then base_object.hpp should be included afer
text_archive.hpp.

Sorry about that.

Robert Ramey


cheesy4poofs wrote:

>> I compiled the following program wiht no errors on my vc 7.1
>> system with no errors or warnings
>>
>> Robert Ramey
>
>
> I finally solved my problem by commenting out the following include:
>
> //#include
> #include
> #include
> #include
>
> Not sure why it solved it, but I'm glad at least to have put this
> behind me. Thanks for the help.
>
> Scott



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Do you Yahoo!?
With a free 1 GB, there's more in store with Yahoo! Mail.
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users