我想打包一个大于 32 个字符的字符串,但打包器每次都返回“da”。
当我使用包含少于 32 个字符的字符串时,一切正常!但较大的字符串仅返回“da”
我的代码如下所示:
msgpack::sbuffer sbuffer;
msgpack::packer<msgpack::sbuffer> packer(&sbuffer);
packer.pack(string("hello this is a string larger than 32 bytes"));
也试过这个:
packer.pack_raw(43);
packer.pack_raw_body("hello this is a string larger than 32 bytes", 43);
在这两种情况下返回:
'da'
任何想法?
感谢帮助
编辑:我解决了这个问题......我用cmake重新安装了它,现在它可以工作了。在我使用 ./configure 之前