linux install jsoncpp0.5.0

要安装jsoncpp,首先要下载好scons,再去安装jsoncpp

scons下载地址:wget http://prdownloads.sourceforge.NET/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: OK
Testing ValueTest/isArray: OK
Testing ValueTest/isBool: OK
Testing ValueTest/isInt: OK
Testing ValueTest/isUInt: OK
Testing ValueTest/isDouble: OK
Testing ValueTest/isString: OK
Testing ValueTest/isNull: OK
All 9 tests passed

你可能感兴趣的:(linux install jsoncpp0.5.0)