I am new to C++ and cLion and I'm using JsonCpp to parse object to text and vice-versa. I am a mac user and I have my .h jsoncpp files stored in /usr/include/jsoncpp and .dylib stored in /usr/lib.
What is the a way to include jsoncpp library into my project? I've tried:
include_directories(/usr/include/jsoncpp)
I can #include <json.h>
but there is another error as shown below:
Undefined symbols for architecture x86_64:
"Json::Value::Value(Json::ValueType)", referenced from:
Account::toJson() in Account.cpp.o
StorageLoad::readfile(std::__1::basic_ifstream<char, std::__1::char_traits<char> >&) in StorageLoad.cpp.o
"Json::Value::Value(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
Account::toJson() in Account.cpp.o
How to resolve this error? I've spent many hours trying but no avail.