C \C++

[Cpp] json 프로그래밍 준비하기

미스터폴 2020. 6. 21. 04:03
반응형

json parsing install in linux~


1. install dependency 
$ pip install scons
$ scons platform=linux-gcc
$ scons platform=linux-gcc check


2. download and build library 

$ wget http://jaist.dl.sourceforge.net/project/jsoncpp/jsoncpp/0.6.0-rc2/jsoncpp-src-0.6.0-rc2.tar.gz

$ tar zxvf jsoncpp-src-0.6.0-rc2.tar.gz

$ cd jsoncpp-src-0.6.0-rc2

$ sudo gedit amalgamate.py

==== Conrtl+H =====
find : json\json
Replace with : json/json
===============
$python amalgamate.py

 

3. copy dist
program folder copy  

 

4. start program
$ cd dist
header add

#include <json/json.h>

반응형