Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-06-02 23:05:28


Wu Yinghui, Freddie wrote:
>>From:
>>"John Spicer" <jspicer_at_[hidden]>
>>Date:
>>Fri, 2 Jun 2006 16:52:25 -0400
>>
>>Has anyone had any luck getting a serialized object (created using boost
>>binary serialization) between two different platforms? I am currently
>>using binary serialization on 32 bit & 64 bit machines without issue.
>>However, passing the serialized objects between the two platform types
>>fail. The serialized classes themselves support interoperability, and as
>>such it appears that the serialization libraries themselves do not. I am
>>assuming they are storing some type of meta data along with the payload?
>>
>>Any thoughts on how to do this and keep with binary serialization?
>>
>>-- John
>
>
>
> Based on my own experience, boost binary archives are _not_ guaranteed
> to be portable between different hardware platforms. There are also some
> hints in the documentation, though I do not immediately recall where it
> is mentioned. (The problem is mostly due to endian mismatch and datatype
> size difference, if my memory is right.)

The binary archive is not portable -- see:

http://www.boost.org/libs/serialization/doc/special.html#portability

for more. If you want portability between platforms the text or xml
archives are your best bet.

Jeff


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