linux下安装编译json-c

GitHub地址

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

国内镜像

mirrors / json-c / json-c · GitCodeicon-default.png?t=N6B9https://gitcode.net/mirrors/json-c/json-c?utm_source=csdn_github_accelerator编译过程:

git clone https://github.com/json-c/json-c.git

可以自己下载压缩包解压一样

建议新建文件夹
mkdir json-c-build

cd json-c-build

cmake ../json-c

注意: 也可以将构建目录放在 json-c 源目录中,甚至根本不使用单独的构建目录,但是有些事情可能不能很好地工作

make
make test
make USE_VALGRIND=0 test   # optionally skip using valgrind
make install

完成后会有头文件和库的路径地址

如下

Install the project...
-- Install configuration: "debug"
-- Installing: /usr/local/lib64/libjson-c.so.5.2.0
-- Installing: /usr/local/lib64/libjson-c.so.5
-- Installing: /usr/local/lib64/libjson-c.so
-- Installing: /usr/local/lib64/libjson-c.a
-- Installing: /usr/local/lib64/cmake/json-c/json-c-targets.cmake
-- Installing: /usr/local/lib64/cmake/json-c/json-c-targets-debug.cmake
-- Installing: /usr/local/lib64/cmake/json-c/json-c-config.cmake
-- Installing: /usr/local/lib64/pkgconfig/json-c.pc
-- Installing: /usr/local/include/json-c/json_config.h
-- Installing: /usr/local/include/json-c/json.h
-- Installing: /usr/local/include/json-c/arraylist.h
-- Installing: /usr/local/include/json-c/debug.h
-- Installing: /usr/local/include/json-c/json_c_version.h
-- Installing: /usr/local/include/json-c/json_inttypes.h
-- Installing: /usr/local/include/json-c/json_object.h
-- Installing: /usr/local/include/json-c/json_object_iterator.h
-- Installing: /usr/local/include/json-c/json_tokener.h
-- Installing: /usr/local/include/json-c/json_types.h
-- Installing: /usr/local/include/json-c/json_util.h
-- Installing: /usr/local/include/json-c/json_visit.h
-- Installing: /usr/local/include/json-c/linkhash.h
-- Installing: /usr/local/include/json-c/printbuf.h
-- Installing: /usr/local/include/json-c/json_pointer.h

至此编译安装完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值