json安装:
http://blog.csdn.net/u011641885/article/details/46755225
tar xvf json-c-0.9.tar.gz
cd json-c-0.9/
./configure
make sudo make install
Ubuntu 的 apt-get 安装
sudo apt-get install libjson0-dev libjson0
cjson安装:
下载:
链接:http://pan.baidu.com/s/1qXPLZgK 密码:53f1
https://www.cnblogs.com/arnoldlu/p/6490860.html
cmake .. -DENABLE_CJSON_UTILS=Off -DENABLE_CJSON_TEST=On -DCMAKE_INSTALL_PREFIX=/usr (生成bin+lib)
cmake .. -DENABLE_CJSON_UTILS=Off -DENABLE_CJSON_TEST=On -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=Off (生成bin)
make
sudo make install (安装libcjson.so)
valgrind 工具
valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all
g++ -g -rdynamic -Wall json.cpp -lm -I/usr/include/json-c/ -I/usr/include/cjson/ -L/usr/lib -ljson-c -lcurl -lcjson
学习web:https://www.cnblogs.com/arnoldlu/p/6490860.html
https://yq.aliyun.com/articles/23909
http://www.cnblogs.com/fengbohello/p/4537436.html