jsoncpp
Library to parse a JSON format file.
Prerequisites
Install MSYS + MinGW.
Install Git.
Install 7zip.
Install Python (I've only tested with 2.7).
Download source
Obtain jsoncpp from sourceforge: 0.5.0 Download
If this is your first time opening .gz, use $PROGRAMFILES/7-Zip/7zFM.exe
Extract jsoncpp-src-0.5.0 directory to $HOME.
Install Python
As listed in the pre-requisites. You may examine the latest release from here:
http://www.python.org/download/releases/
Install scons to MSYS
jsoncpp uses the Python-based build system "scons" instead of "make".
Update your .profile to include Python27 and Python27/Scripts in your PATH.
Install scons-2.0.1.tar.gz:
Download scons-2.0.1.tar.gz from the scons homepage: http://www.scons.org
Extract scons-2.0.1/ to your development directory (C:\dev)
Start the MinGW Shell
cd /c/dev/scons-2.0.1
python setup.py install
Build jsoncpp
Once you have scons and the jsoncpp source, you can build jsoncpp.
Start the MinGW Shell
cd jsoncpp-src-0.5.0/
scons.py platform=mingw
That was easy.
Install
Create a lib directory and copy the json static library:
mkdir $HOME/lib
cp libs/mingw/libjson_mingw_libmt.a $HOME/lib/
Create an include directory and copy the json headers:
mkdir $HOME/include
cp -pr $HOME/jsoncpp-src-0.5.0/include/json $HOME/include/json
When you build a program with jsoncpp, you will need linker options:
-L $HOME/lib -l json_mingw_libmt
and compiler options:
-I $HOME/include