How to bind jsoncpp?

How to link jsoncpp with a c ++ program using g ++? I tried:

g++ -o program program.cpp -L/path/to/library/files -ljsoncpp, -ljson, -llibjsoncpp

but g ++ keeps saying:

/usr/bin/ld: cannot find -lsomething
+3
source share
2 answers

Take a look /path/to/library/filesto see what your file really is called *.a. On my system, I contact:

-ljson_linux-gcc-4.4.3_libmt

Some libraries will create a link from lib<name>.ato for you lib<name>-<version>.a, but I don't think jsoncpp does this automatically. Therefore, when linking, you need to specify the full name.

+2
source

You can also try using the new assembled version of jsoncpp, which is the new version of version 0.6.0.

jsoncpp, .cpp . jsoncpp , jsoncpp.

+4

Source: https://habr.com/ru/post/1791067/


All Articles