I'm a new-ish C++ programmer, and I'm doing my first program on my own using C++. I decided I would like to use JSON to store some of the data I'm going to be using, and I've found a library to handle JSON, JsonCpp.
I've installed the library using my Linux system's package manager, and in my C++ code, I've used in my source code file
#include <json>
and compiled it using g++ and it's -ljson and -L/usr/lib options (libjson.so is located in /usr/lib
).
However, the first usage of Json::Value, an object provided by the library, gives a compilation error of "Json has not declared". I'm sure my mistake is something simple, so could someone explain what I'm doing wrong? None of the books I had mention how to use shared libraries, so I've had to google to find this much.
EDIT: g++ with the -E option gives this error:
json: no such file or directory.