You need to follow these instructions (I slightly modified
this installing guide for Mac OS X) to install JsonCpp in Ubuntu and use it from Eclipse:
1. Download JsonCpp from
here.
2. Create a new folder decompress and extract JsonCpp there:
$ mkdir /home/youruser/JsonCpp
$ tar xzf /home/youruser/JsonCpp/jsoncpp-src-0.5.0.tar.gz
3. Donwload the SCONS software construction tool from
here and decompress and extract it in the jsoncpp-src-0.5.0 folder.
$ tar xzf /home/youruser/JsonCpp/jsoncpp-src-0.5.0/scons-local-1.3.0.tar.gz
4. Copy the contents of scons-local-1.3.0 inside jsoncpp-src-0.5.0
5. Go to jsoncpp-src-0.5.0 and build JsonCpp using SCONS:
$ cd /home/youruser/JsonCpp/jsoncpp-src-0.5.0
$ python scons.py platform=linux-gcc check
5. Install the JsonCpp library and header files:
$ sudo cp /home/youruser/JsonCpp/jsoncpp-src-0.5.0/libs/linux-gcc-4.4.5/libjson_linux-gcc-4.4.5_libmt.so /usr/lib
$ sudo mkdir /usr/include/jsoncpp
$ sudo cp /home/youruser/JsonCpp/jsoncpp-src-0.5.0/include/json/* /usr/include/jsoncpp/
6. Finally open your Eclipse project, go to Project -> Properties -> C/C++ Build -> Settings -> GCC C++ Linker -> libraries and add json_linux-gcc-4.4.5_libmt.
That's all you need to start using JsonCpp in Eclipse