msgpack-c icon indicating copy to clipboard operation
msgpack-c copied to clipboard

error msgpack-c supports only big endian and little endian

Open Sod-Almighty opened this issue 7 years ago • 2 comments

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

Sod-Almighty avatar Sep 04 '18 23:09 Sod-Almighty

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 avatar Sep 06 '18 13:09 redboltz

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.

redboltz avatar Sep 18 '18 02:09 redboltz