I just started with json a day ago and wrote this simple piece of code.
#include "json/json.h"
const char* lbuf = "[{color: 'red',value: '#f00'},{color: 'green',value: '#0f0'}]";
Json::Value root;
Json::Reader reader;
bool parsingSuccessful = reader.parse(lbuf, root);
if(!parsingSuccessful)
{
std::cout << "parsing not successful";
}
else
{
std::cout << "parsing successful";
}
I am getting these compilation issues.
undefined reference to `Json::Value::Value(Json::ValueType)'
undefined reference to `Json::Reader::Reader()'
Can someone help me figure it out? Thanks.