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.
|
|
3 years ago | |
|---|---|---|
| .. | ||
| AUTHORS | 3 years ago | |
| Android.configure.mk | 3 years ago | |
| Android.mk | 3 years ago | |
| COPYING | 3 years ago | |
| ChangeLog | 3 years ago | |
| Doxyfile | 3 years ago | |
| Makefile.am | 3 years ago | |
| Makefile.am.inc | 3 years ago | |
| README | 3 years ago | |
| README-WIN32.html | 3 years ago | |
| README.html | 3 years ago | |
| README.md | 3 years ago | |
| RELEASE_CHECKLIST.txt | 3 years ago | |
| arraylist.c | 3 years ago | |
| arraylist.h | 3 years ago | |
| autogen.sh | 3 years ago | |
| bits.h | 3 years ago | |
| check.log | 3 years ago | |
| config.h | 3 years ago | |
| config.h.in | 3 years ago | |
| configure.ac | 3 years ago | |
| debug.c | 3 years ago | |
| debug.h | 3 years ago | |
| json-c-uninstalled.pc.in | 3 years ago | |
| json-c.pc.in | 3 years ago | |
| json.h | 3 years ago | |
| json_c_version.c | 3 years ago | |
| json_c_version.h | 3 years ago | |
| json_config.h | 3 years ago | |
| json_config.h.in | 3 years ago | |
| json_inttypes.h | 3 years ago | |
| json_object.c | 3 years ago | |
| json_object.h | 3 years ago | |
| json_object_iterator.c | 3 years ago | |
| json_object_iterator.h | 3 years ago | |
| json_object_private.h | 3 years ago | |
| json_tokener.c | 3 years ago | |
| json_tokener.h | 3 years ago | |
| json_util.c | 3 years ago | |
| json_util.h | 3 years ago | |
| libjson.c | 3 years ago | |
| linkhash.c | 3 years ago | |
| linkhash.h | 3 years ago | |
| math_compat.h | 3 years ago | |
| printbuf.c | 3 years ago | |
| printbuf.h | 3 years ago | |
| random_seed.c | 3 years ago | |
| random_seed.h | 3 years 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 compilerlibtool
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