Giter Club home page Giter Club logo

jsoncpp's Introduction

JsonCpp的使用

两种调用方法

  • (1)由ubuntu安装jsoncpp库,sudo apt-get install libjsoncpp-dev。这种方法最方便,不过要求运行环境都得装这个库
// 在调用jsoncpp的源码文件中
#include<jsoncpp/json/json.h>
# 编译时,指定链接到jsoncpp库
-ljsoncpp

# jsoncpp静态和动态库的位置可以这样找到
ls /usr/lib/*/*jsoncpp*
  • (2)下载jsoncpp的源码编译生成jsoncpp的静态和动态库;将静态库和一系列的json头文件放入自己的项目中。这种方法方便项目移植,不要求运行环境装了jsoncpp库;本项目采用这种方法
    • lib目录中的libjsoncpp_linux-4.9.4.a,是从jsoncpp源码编译后生成的静态库文件复制而来
    • include/json目录中的一系列头文件,也是从jsoncpp源码中复制而来
    • 特地留了静态库的版本号,以便读者判断是否可以直接拿去用

参考:wiki-jsoncpp

jsoncpp's People

Stargazers

Ulaş SAYGIN avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.