大家好,我在程序中使用Value,同样的代码在win32平台编译正常。
在Android上编译通不过,请大家多多指点,谢谢。
代码如下:
rapidjson::Value instance(rapidjson::kObjectType);
instance.AddMember(“id”, getId(), allocator); //getId() 返回一个int型
报错信息:
jni/…/…/cocos2d/external\json/document.h:292:16: error: call to constructor of ‘rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator >’ is ambiguous
GenericValue v(value);
^ ~~~~~
jni/…/…/Classes/Message/TLInstance.cpp:71
note: in instantiation of function template specialization ‘rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator >::AddMember’ requested here
instance.AddMember(“id”, getId(), allocator);
^
