Solved JSON-C compilation issue with qt
-
I'm porting a C project into QT C++ and I've already installed libjsonc-dev and libjson0 libjson0-dev on my Ubuntu box, but I got many compilation error indicating QT compiler is not understanding json-c data types,
Sample Errors:
Undefined reference tojson_object_array_length
Undefined reference tojson_object_array_get_idx
Any experience in using json-c inside QT ? -
HI and welcome to devnet,
why do you need json-c?? Qt has native JSON support
-
As I said I am importing a already implemented C code into QT and I prefer to not changing much code,
Any help making JSON-C works on QT is highly appreciated. -
@hgoles said:
Undefined reference to json_object_array_length
sounds like a linker error. Have you included your library to be linked in your qt project?
Something like this (in your .pro file):LIBS += -ljsonc
-
-
You're welcome.