You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Building on Unix with git, gcc and autotools
  2. Home page for json-c:
  3. https://github.com/json-c/json-c/wiki
  4. Caution: do NOT use sources from svn.metaparadigm.com, they are old.
  5. Prerequisites:
  6. gcc (or another C compiler)
  7. libtool
  8. If you're not using a release tarball, you'll also need:
  9. autoconf (autoreconf)
  10. automake
  11. Github repo for json-c:
  12. https://github.com/json-c/json-c
  13. $ git clone https://github.com/json-c/json-c.git
  14. $ cd json-c
  15. $ sh autogen.sh
  16. Then
  17. $ ./configure
  18. $ make
  19. $ make install
  20. To build and run the test programs run
  21. $ make check
  22. Linking to libjson-c
  23. If your system has pkgconfig then you can just add this to your makefile
  24. CFLAGS += $(shell pkg-config --cflags json-c)
  25. LDFLAGS += $(shell pkg-config --libs json-c)
  26. Without pkgconfig, you would do something like this:
  27. JSON_C_DIR=/path/to/json_c/install
  28. CFLAGS += -I$(JSON_C_DIR)/include/json-c
  29. LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c