rapidjson::Document
副本结果链接错误:复制rapidjson :: Document时为什么链接器错误但不编译错误?
Error 5 error LNK2019: unresolved external symbol "private: __thiscall rapidjson::GenericValue,class rapidjson::MemoryPoolAllocator >::GenericValue,class rapidjson::MemoryPoolAllocator >(class rapidjson::GenericValue,class rapidjson::MemoryPoolAllocator > const &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@@Z) referenced in function "public: __thiscall rapidjson::GenericDocument,class rapidjson::MemoryPoolAllocator >::GenericDocument,class rapidjson::MemoryPoolAllocator >(class rapidjson::GenericDocument,class rapidjson::MemoryPoolAllocator > const &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@@Z) C:\Layer.obj
我看到rapidjson::Document
是rapidjson::GenericValue
一个孩子不具有一个拷贝构造函数:
//! Copy constructor is not permitted.
private:
GenericValue(const GenericValue& rhs);
我不知道为什么没有编译器错误,但链接器错误? C++试图做什么?
我使用MVC 2013和rapidjson 0.11。这里也有类似的主题:
但如果复制构造函数是私人的,并没有实现,为什么我不会收到编译错误?这实际上是我的问题。 – Narek 2015-03-31 08:25:12
@Narek可能表示某些类自己的代码使用了复制构造函数。或者一个编译器错误。 – 2015-08-06 23:21:30