Json-c

From campisano.org
Jump to navigation Jump to search

Vademecum

Environment

# cat /etc/debian_version 
6.0.4
# gcc -v
gcc version 4.4.5
Debian 4.4.5-8
# uname -r
3.1.0-1-amd64


Build and install

mkdir /srv/local/json-c
chown nobody:nogroup /srv/local/json-c
su -s /bin/bash nobody
wget http://oss.metaparadigm.com/json-c/json-c-0.9.tar.gz
tar -xzf json-c-0.9.tar.gz 
cd json-c-0.9
./configure --prefix=/srv/local/json-c
make
make install
exit


Test an example

The examples are in the source path:

su -s /bin/bash nobody
g++ -Wall -I /srv/local/json-c/include/ test1.c -o test -L /srv/local/json-c/lib -ljson
LD_LIBRARY_PATH=/srv/local/json-c/lib/ ./test


References