
Wu Yinghui, Freddie wrote:
From: "John Spicer"
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