首页 > 代码库 > linux安装JSONCPP
linux安装JSONCPP
#tar -zxf scons-2.1.0.tar.gz
#cd scons-2.1.0
#python setup.py install
#tar -zxf jsoncpp-src-0.5.0.tar.gz
#cd jsoncpp-src-0.5.0
#scons platform=linux-gcc
#mv libs/linux-gcc-4.2.4/libjson_linux-gcc-4.2.4_libmt.so /lib
#mv include/json/ /usr/include/
#ldconfig
#./bin/linux-gcc-4.2.4/test_lib_json 注意这里的版本号可能不同
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
--------------
下载软件包:jsoncpp-src-0.5.0.tar.gz scons-2.1.0.tar.gz
# tar zxvf scons-2.1.0.tar.gz
# tar zxvf jsoncpp-src-0.5.0.tar.gz
设定环境变量【关键】,绝对路径
# export MYSCONS=解压的路径
# export SCONS_LIB_DIR=$MYSCONS/engine
# cd jsoncpp-src-0.5.0
# python $MYSCONS/script/scons platform=linux-gcc
编译成功后,在在jsoncpp-src-0.5.0/libs/目录下找到相应的*.a和*.so
可以修改为:mv libjson_linux-gcc-4.4.6_libmt.so libjson.so
#cd scons-2.1.0
#python setup.py install
#tar -zxf jsoncpp-src-0.5.0.tar.gz
#cd jsoncpp-src-0.5.0
#scons platform=linux-gcc
#mv libs/linux-gcc-4.2.4/libjson_linux-gcc-4.2.4_libmt.so /lib
#mv include/json/ /usr/include/
#ldconfig
#./bin/linux-gcc-4.2.4/test_lib_json 注意这里的版本号可能不同
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
--------------
下载软件包:jsoncpp-src-0.5.0.tar.gz scons-2.1.0.tar.gz
# tar zxvf scons-2.1.0.tar.gz
# tar zxvf jsoncpp-src-0.5.0.tar.gz
设定环境变量【关键】,绝对路径
# export MYSCONS=解压的路径
# export SCONS_LIB_DIR=$MYSCONS/engine
# cd jsoncpp-src-0.5.0
# python $MYSCONS/script/scons platform=linux-gcc
编译成功后,在在jsoncpp-src-0.5.0/libs/目录下找到相应的*.a和*.so
可以修改为:mv libjson_linux-gcc-4.4.6_libmt.so libjson.so
linux安装JSONCPP
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。