Compile error
Closed this issue · 4 comments
hi, I'm try to use xchange to convert RapidJSON to msgpack-c, but it seems to work with a msgpack-c older version, I'm think that because when I try compile it throw erros like:
document.hpp:180:32: error: no member named 'RAW' in namespace 'msgpack::v1::type'
o.type = type::RAW;
In the current msgpack-c version it seems to refer to type::STR and others similars errors.
But there are a few that I couldn't resolve, like this:
/document.hpp:183:44: error: no member named 'malloc' in 'msgpack::v1::zone'
char* ptr = (char*)o.zone->malloc(s.size());
And this one, this is the traceback (note that I added msgpack-c and RapidJSON as a embedded library for my project)
In file included from main.cc:9:
In file included from ./msgpack-c/include/msgpack.hpp:10:
./msgpack-c/include/msgpack/object.hpp:158:11: error: no member named 'msgpack_pack' in 'rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>'
v.msgpack_pack(o);
~ ^
./msgpack-c/include/msgpack/object.hpp:178:59: note: in instantiation of member function 'msgpack::v1::detail::packer_serializer<msgpack::v1::sbuffer, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >::pack' requested here
return msgpack::detail::packer_serializer<Stream, T>::pack(o, v);
^
./msgpack-c/include/msgpack/adaptor/adaptor_base.hpp:62:12: note: in instantiation of function template specialization 'msgpack::v1::adaptor::pack<rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>, void>::operator()<msgpack::v1::sbuffer>' requested here
return adaptor::pack<T>()(o, v);
^
./msgpack-c/include/msgpack/object.hpp:384:14: note: in instantiation of function template specialization 'msgpack::v1::operator<<<msgpack::v1::sbuffer, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >' requested here
msgpack::operator<<(*this, v);
^
./msgpack-c/include/msgpack/pack.hpp:134:24: note: in instantiation of function template specialization 'msgpack::v1::packer<msgpack::v1::sbuffer>::pack<rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >' requested here
packer<Stream>(*s).pack(v);
^
main.cc:167:18: note: in instantiation of function template specialization 'msgpack::v1::pack<msgpack::v1::sbuffer, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >' requested here
msgpack::pack(&sbuf, doc);
also, there exist a highly chance that I'm was making the mistake due to my poor knowledge about msgpack-c, rapidJSON and your adapter
any advice or help with this is greatly appreciated, thanks in advance!! :)
My compiler version (clang-700.1.76)
I'll try to make a upgrade to all depended libs to latest in 2~3 days.
Please stay turned.
@YosefMac
I have made the update and compiled on travis and my mac.
Would you have it a try now?
thanks I'll try