AnsweredAssumed Answered

error:link2019 when use pisdk with jsoncpp

Question asked by lizhe on Jun 8, 2017
Latest reply on Jun 8, 2017 by gachen

My PI application need to get configure from a json file,so I use PI SDK with jsonccpp(json_vc71_libmtd.lib,I get it from json-cpp download | SourceForge.net ) . but  when I debug, accure error:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorLNK2005"public: static bool const std::numeric_limits<unsigned short>::is_signed" (?is_signed@?$numeric_limits@G@std@@2_NB) already defined in json_vc71_libmtd.lib(json_value.obj)pisdktest01C:\Users\student01\Documents\Visual Studio 2015\Projects\pisdktest01\pisdktest01\json_vc71_libmtd.lib(json_reader.obj)1

 

 

if I do not add the json lib(json_vc71_libmtd.lib) to the project,  error like this:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorLNK2019unresolved external symbol "public: __thiscall Json::Value::Value(enum Json::ValueType)" (??0Value@Json@@QAE@W4ValueType@1@@Z) referenced in function "class Json::Value __cdecl GetConfig(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetConfig@@YA?AVValue@Json@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)pisdktest01C:\Users\student01\Documents\Visual Studio 2015\Projects\pisdktest01\pisdktest01\pisdktest01.obj1

 

can anyone help?

Outcomes