As the question tells how should I install jsonccpp in ubuntu 14.04. I have downloaded the jsoncpp-src-0.5.0.tar.gz form sourceforge. Then I opened nautilus using sudo and copied,pasted and extracted the tar.gz file in /opt. I have installed the cmake and used this code to install as suggested in the jsoncpp github
cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF \
-DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles"
But its giving this error
CMake Error: The source directory "/opt/jsoncpp-src-0.5.0" does not
appear to contain CMakeLists.txt. Specify --help for usage, or press
the help button on the CMake GUI.
- Codeblocks is used as C++ development IDE
#include <json/json.h>json/json.h: No such file or directory – Eka Jul 23 '16 at 05:00sudo find /usr -name json.hRunning this on my Trusty system shows/usr/include/jsoncpp/json/json.h– andrew.46 Jul 23 '16 at 05:03#include <jsoncpp/json/json.h>and now its working – Eka Jul 23 '16 at 05:08