1、下载json-c源码
git clone https://github.com/json-c/json-c.git
2、解压进入根目录
3、./autogen.sh ./configure CC=arm-linux-gcc --host=arm-linux --prefix=/usr/local
4、将json-c的库文件copy到arm开发板上
5、错误1:
运行json-c测试程序,出现段错误
解决:注释掉config.h文件中/#define HAVE_USELOCALE 1,再次make
6、错误2:
出现非法指令
分析:不支持浮点数运算
解决:修改linkhash.h文件中#define LH_LOAD_FACTOR 1
注意:这样修改会有什么影响,暂时不知道!!!