in function rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::GenericDocument(rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&):
error: undefined reference to 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::GenericValue(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&)'
I am facing this error while using rapidjson library in cocos2dX.
This question was asked a while ago, recording the answer here for anyone else with the same problem.
If you are passing a rapidjson::Document
into a function, try passing by reference. i.e. instead of void doSomething(rapidjson::Document doc)
write void doSomething(rapidjson::Document &doc)
. I think there is an issue with using the rapidjson::Document
copy constructor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With