msgpack / msgpack-c

MessagePack implementation for C and C++ / msgpack.org[C/C++]
Other
3.02k stars 881 forks source link

error msgpack-c supports only big endian and little endian #734

Open Sod-Almighty opened 6 years ago

Sod-Almighty commented 6 years ago

When I attempt to use this library in the Arduino IDE, I get the following error:

In file included from \\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack/zone.h:13:0,
                 from \\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack/object.h:13,
                 from \\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack.h:17,
                 from \\nas\data\Documents\Projects\symbiote\utility.pc-power-ctl\utility.pc-power-ctl.ino:13:
\\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack/sysdep.h:146:5: error: #error msgpack-c supports only big endian and little endian

In file included from \\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack/pack.h:125:0,
                 from \\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack.h:19,
                 from \\nas\data\Documents\Projects\symbiote\utility.pc-power-ctl\utility.pc-power-ctl.ino:13:
\\nas\data\Documents\Programming\Arduino\libraries\messagepack/msgpack/pack_template.h:22:2: error: #error msgpack-c supports only big endian and little endian
redboltz commented 6 years ago

msgpack-c uses Boost.Predef to check endian. Recently Boost.Predef is updated by #730. It is reflected to the master but not released yet.

Could you check your msgpack-c? If commit: a3986b3bdc9322754db090992dfc4a05826a8f76 is included, you are using up-to-date Boost.Predef.

Even if you are using up-to-date endian checking, you might get the same error. In this case, please let me know.

redboltz commented 6 years ago

After #736 merged, you can set MSGPACK_ENDIAN_LITTLE_BYTE=1 or MSGPACK_ENDIAN_BIG_BYTE=1 explicitly. If auto detection doesn't work on your environment, you can use it.