要安装jsoncpp,首先要下载好scons,再去安装jsoncpp
scons下载地址:wget http://prdownloads.sourceforge/scons/scons-2.2.0.tar.gz
Jsoncpp 下载地址 http://sourceforge.net/projects/jsoncpp/files/latest/download?_test=goal
安装步骤如下:#tar -zxvf scons-2.1.0.tar.gz #cd scons-2.1.0
#python setup.py install
#tar -zxvf jsoncpp-src-0.5.0.tar.gz
#cd jsoncpp-src-0.5.0
#scons platform=linux-gcc
#mv libs/linux-gcc-4.4.7/libjson_linux-gcc-4.4.7_libmt.so /lib
#ln /lib/libjson_linux-gcc-4.4.7_libmt.so /lib/libjson.so
#mv include/json/ /usr/include/
#ldconfig
#./bin/linux-gcc-4.4.7/test_lib_json
【注意这里的版本号可能不同】先通过cd libs进入libs目录,再用“ls”命令查看自己的版本号,然后在上述步骤中修改成自己的版本
号即可
Testing ValueTest/size: OK
Testing ValueTest/isObject: OKTesting ValueTest/isArray: OKTesting ValueTest/isBool: OKTesting ValueTest/isInt: OKTesting ValueTest/isUInt: OKTesting ValueTest/isDouble: OKTesting ValueTest/isString: OKTesting ValueTest/isNull: OKAll 9 tests passed