LNK2019: “Unresolved external symbol” with rapidjson

后端 未结 2 911
盖世英雄少女心
盖世英雄少女心 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:02

    Looking at the error it appears that the function returning the jsonObj is doing some kind of a copy or move construction as a part of returning the value and the underlying classes do not allow this probably by making those constructors private members.

    There are classes whose design requires that a copy or assignment is prohibited in order to prevent memory leaks or because the objects are singleton type objects and only one version of the object is allowed.

    Looking at this documentation on rapidjson there is a note in the section on Move semantics that may be pertinent. It looks like they are preventing a Copy in order to improve performance.

提交回复
热议问题