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