Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Sometimes Fails Reading Binary File
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-16 11:36:00


AMDG

Robert McCullough wrote:
> I was able to compile and run my app on Windows 7.
> Debugging using Visual Studio 2008 and using Boost 1.43.0 with the patch
> from https://svn.boost.org/trac/boost/ticket/4257
>
> The value of l at line 56 of boost/archive/impl/basic_binary_archive.ipp is
> I = 369098752;
>

= 0x16000000

indicating that you're trying to read the archive on a
little endian machine, when it was written on a big
endian machine.

> file_signature = ""
> Line 56: if(l == std::strlen(BOOST_ARCHIVE_SIGNATURE())) { Fails!
> Line 70: if(file_signature != BOOST_ARCHIVE_SIGNATURE()) is true so, the
> archive_exception::invalid_signature is thrown on line 73.
>
> On my Window 7 PC,
> sizeof(size_t) == 4
> sizeof(library_version_type) could not find definition of
> library_version_type
>

It's boost::archive::library_version_type defined in
boost/archive/basic_archive.hpp

> sizeof(int) == 4
> sizeof(long) == 4
> sizeof(float) == 4
> sizeof(double) == 8
>

In Christ,
Steven Watanabe


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