- 下载
https://github.com/open-source-parsers/jsoncpp - 解压
- cd到源码目录的src/lib_json目录下执行
arm-linux-g++ -std=c++11 -shared -fPIC *.cpp -I../../include -o libjsoncpp.so
arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi -std=c++11 -shared -fPIC *.cpp -I../../include -o libjsoncpp.so
- 将源码目录的include下的json目录添加到工程中
- 包含头文件#include “json/json.h”
- 工程Makefile中链接库增加上-ljsoncpp