본문 바로가기

Linux/Ubuntu

jsoncpp 빌드하기

[출처] : http://jinwoonote.tistory.com/entry/jsoncpp-%EC%84%A4%EC%B9%98%EB%B0%A9%EB%B2%95


1. Download JsonCpp from here

2. Create a new folder decompress and extract JsonCpp there:
$ mkdir /home/youruser/JsonCpp
$ tar xzf /home/youruser/JsonCpp/jsoncpp-src-0.5.0.tar.gz

3. Donwload the SCONS software construction tool from here and decompress and extract it in the jsoncpp-src-0.5.0 folder.
$ tar xzf /home/youruser/JsonCpp/jsoncpp-src-0.5.0/scons-local-1.3.0.tar.gz

4. Copy the contents of scons-local-1.3.0 inside jsoncpp-src-0.5.0

5. Go to jsoncpp-src-0.5.0 and build JsonCpp using SCONS:
$ cd /home/youruser/JsonCpp/jsoncpp-src-0.5.0
$ python scons.py platform=linux-gcc check

5. Install the JsonCpp library and header files:
$ sudo cp /home/youruser/JsonCpp/jsoncpp-src-0.5.0/libs/linux-gcc-4.4.5/libjson_linux-gcc-4.4.5_libmt.so
/usr/lib

$ sudo mkdir /usr/include/jsoncpp $ sudo cp /home/youruser/JsonCpp/jsoncpp-src-0.5.0/include/json/* /usr/include/jsoncpp/


6. Finally open your Eclipse project, go to Project -> Properties -> C/C++ Build -> Settings -> GCC C++ Linker -> libraries and add json_linux-gcc-4.4.5_libmt.

That's all you need to start using JsonCpp in Eclipse


원문링크 :  http://garajeando.blogspot.kr/2011/06/how-to-install-jsoncpp-in-ubuntu-and.html