Undefined reference to QJson::Parser::Parser
At first you have to find a library file rather than a *.cpp
file. Maybe it has a name like "libqjson.a"
or "libqjson.so"
and compile this library with your code or pass this keys to
g++ -L(lib path) -lqjson
As it turned out (see comments below), your library path is /usr/local/lib
, so this line becomes:
g++ -L/usr/local/lib -lqjson
Using Qt (qmake), just add this line to your .pro
file in order to pass these two flags to g++:
LIBS += -L/usr/local/lib -lqjson