On Wed, Oct 7, 2009 at 6:48 PM, Henner Zeller <h.zel...@acm.org> wrote:

> Still haven't run it (I only seem to have a too old cmake; a simple
> Makefile with a .proto and .cc file showing the problem would be
> better. Please strip down the example if someone should help debugging
> it ;) )
> Anyway, it seems that you in write_message() to write a header with
> some magic number and the size.
>        stream << magic8;
>        stream << (uint8_t)data_types::PB_DATA;
>        stream << _htole32(message.GetCachedSize());
> .. but wouldn't this write the output in decimal instead of binary
> that you intend ? So it will not be exactly 4 bytes. So better write
> this in binary ;)
> (and BTW, it is not a good idea to use some system macros (such as
> _htole32() .. better use htonl())
Indeed, except I need it to work on Windows with MSVC and MinGW.  I decided
after much fussing around to just roll my own.

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to