LNK2019: “Unresolved external symbol” with rapidjson

后端 未结 2 907
盖世英雄少女心
盖世英雄少女心 2021-01-21 21:47

I have a Visual C++ Project in which I added the rapidjson library, which is tested to be working properly. But when I add a rapidjson::Document type to the nested

2条回答
  •  生来不讨喜
    2021-01-21 22:15

    jsonObj doesn't have copy constructor and it can't have any copy constructor since Document's copy constructor is disabled in rapidjson. Try to hold pointer to document instead, something like this :

    class jsonObj {
        string jsonStr;
        string message;
        Document* doc; //HERE IS THE PROBLEM
        bool validMsg;
    }
    

    Or pass document(jsonObj) from outside to:

    jsonObj query(string sSQL);
    

    For example:

    query(string sSQL, jsonObj & out_obj)
    

提交回复
热议问题