You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jianglk.darker 7ee447c011
v811_spc009_project
4 months ago
..
AUTHORS v811_spc009_project 4 months ago
Android.configure.mk v811_spc009_project 4 months ago
Android.mk v811_spc009_project 4 months ago
COPYING v811_spc009_project 4 months ago
ChangeLog v811_spc009_project 4 months ago
Doxyfile v811_spc009_project 4 months ago
Makefile.am v811_spc009_project 4 months ago
Makefile.am.inc v811_spc009_project 4 months ago
README v811_spc009_project 4 months ago
README-WIN32.html v811_spc009_project 4 months ago
README.html v811_spc009_project 4 months ago
README.md v811_spc009_project 4 months ago
RELEASE_CHECKLIST.txt v811_spc009_project 4 months ago
arraylist.c v811_spc009_project 4 months ago
arraylist.h v811_spc009_project 4 months ago
autogen.sh v811_spc009_project 4 months ago
bits.h v811_spc009_project 4 months ago
check.log v811_spc009_project 4 months ago
config.h v811_spc009_project 4 months ago
config.h.in v811_spc009_project 4 months ago
configure.ac v811_spc009_project 4 months ago
debug.c v811_spc009_project 4 months ago
debug.h v811_spc009_project 4 months ago
json-c-uninstalled.pc.in v811_spc009_project 4 months ago
json-c.pc.in v811_spc009_project 4 months ago
json.h v811_spc009_project 4 months ago
json_c_version.c v811_spc009_project 4 months ago
json_c_version.h v811_spc009_project 4 months ago
json_config.h v811_spc009_project 4 months ago
json_config.h.in v811_spc009_project 4 months ago
json_inttypes.h v811_spc009_project 4 months ago
json_object.c v811_spc009_project 4 months ago
json_object.h v811_spc009_project 4 months ago
json_object_iterator.c v811_spc009_project 4 months ago
json_object_iterator.h v811_spc009_project 4 months ago
json_object_private.h v811_spc009_project 4 months ago
json_tokener.c v811_spc009_project 4 months ago
json_tokener.h v811_spc009_project 4 months ago
json_util.c v811_spc009_project 4 months ago
json_util.h v811_spc009_project 4 months ago
libjson.c v811_spc009_project 4 months ago
linkhash.c v811_spc009_project 4 months ago
linkhash.h v811_spc009_project 4 months ago
math_compat.h v811_spc009_project 4 months ago
printbuf.c v811_spc009_project 4 months ago
printbuf.h v811_spc009_project 4 months ago
random_seed.c v811_spc009_project 4 months ago
random_seed.h v811_spc009_project 4 months ago

README.md

json-c

Building on Unix with git, gcc and autotools

Home page for json-c: https://github.com/json-c/json-c/wiki

Caution: do NOT use sources from svn.metaparadigm.com, they are old.

Prerequisites:

  • gcc, clang, or another C compiler
  • libtool

If you're not using a release tarball, you'll also need:

  • autoconf (autoreconf)
  • automake

Make sure you have a complete libtool install, including libtoolize.

json-c GitHub repo: https://github.com/json-c/json-c

$ git clone https://github.com/json-c/json-c.git
$ cd json-c
$ sh autogen.sh

followed by

$ ./configure
$ make
$ make install

To build and run the test programs:

$ make check

Linking to libjson-c

If your system has pkgconfig, then you can just add this to your makefile:

CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c)

Without pkgconfig, you would do something like this:

JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c