libjson编译和使用

VS2019下静态编译libjsoncpp和libjson-rpc的完整指南 JSON序列化与RPC通信是C++服务端开发中的基础技术,jsoncpp和json-rpc是常用的开源库。在Windows平台,静态编译能避免运行时库依赖,实现绿色部署。其原理是将库以/MT选项编译为.lib文件,直接嵌入可执行程序,从而消除DLL缺失风险。技术价值在于简化部署、提升兼容性,尤其适合工具类程序和内网服务。应用场景包括跨机调用、插件系统等。然而,VS2019下编译常遇链接错误和运行时库不匹配问题。本文详解静态编译步骤、工程配置及避坑方法,助你高效集成。 阅读详情
libjson编译和使用
下载libjson_7.6.1

libjson.vcproj
240行少一个">",加上

JSONOptions.h
注释此行:
#define JSON_DEPRECATED_FUNCTIONS

调试模式
#define JSON_DEBUG
或者在工程里面定义
 
如果C++使用还需要注释此行:
#define JSON_LIBRARY

编译时在项目android.mk内增加以下内容:
LOCAL_WHOLE_STATIC_LIBRARIES += libjson_static
$(call import-module,libjson)

附:
libjson/android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_CPPFLAGS += -fexceptions

LOCAL_MODULE    := libjson_static

LOCAL_MODULE_FILENAME := libjson

LOCAL_SRC_FILES := _internal/Source/internalJSONNode.cpp \
_internal/Source/JSONAllocator.cpp \
_internal/Source/JSONChildren.cpp \
_internal/Source/JSONDebug.cpp \
_internal/Source/JSONIterators.cpp \
_internal/Source/JSONMemory.cpp \
_internal/Source/JSONNode.cpp \
_internal/Source/JSONNode_Mutex.cpp \
_internal/Source/JSONPreparse.cpp \
_internal/Source/JSONStream.cpp \
_internal/Source/JSONValidator.cpp \
_internal/Source/JSONWorker.cpp \
_internal/Source/JSONWriter.cpp \
_internal/Source/libjson.cpp

LOCAL_WHOLE_STATIC_LIBRARIES := libjson_static

LOCAL_C_INCLUDES := $(LOCAL_PATH) \
                           $(LOCAL_PATH)/_internal/Source \
                           $(LOCAL_PATH)/_internal/Source/JSONDefs
                    
include $(BUILD_STATIC_LIBRARY)

$(call import-module,libjson)

现编译的lib_json,json,包含头文件,lib,dll, 包含64位,32位亲测可用 立即下载

相关推荐

win10和Mac上安装Freesurfer

Mac安装Freesurfer 软件下载地址 可以根据官方给出的demo视频一步一步下载

Daily_365的博客 6091

configure: error: C++ Compiler required to compile Anjuta

configure: error: C++ Compiler required to compile Anjuta 解决办法

HackProgramer的专栏 1054

Proteus课设原理图及报告

1. I/O 口:32 个可编程 I/O 引脚,分成 4 个并行 I/O 端口 (P0, P1, P2, P3),P0 功能段选 a、b、c、d、e、f、g、dp 使其中部分点亮,P2 功能为位选 1、2、4.按键操作分析:P3.0-设置时钟的时间,P3.1-确定更改的时钟时间,P3.2-对。时钟设置标志 0 不设置,1 设置时,2 设置分,3 设置秒。P3.0 按下的次数对应 不设置,设置时,设置分,

2303_76688805的博客 1190

libjson 编译和使用 - 1. 编译

最近想用box2dEdit来编辑一下比较复杂的图形然后倒入到自己有游戏里,但box2dEdit编辑后输出的是json文件。 因为没有用C++解析json文件的经验,在网上找了很多有关json的开源项目,有cjson(这是c编写的)jsoncpp(C++的项目,但有人说它的移植性不够好)libjson(支持C和C++)由于对C有一种莫名的恐惧感,所以最后还是选择了libjson这个库。 OK!先

cocos2d-x 学习之路 1万+

SAR动目标检测三剑客:DPCA/ATI/STAP技术选型指南(含2023最新实验数据对比)

本文深入对比了SAR动目标检测三大主流技术DPCA、ATI与STAP的核心原理与性能差异。基于2023年最新实验数据,分析了它们在最小可检测速度、测速精度、计算复杂度及对通道失配敏感度等方面的优劣,并结合海洋监视与城市交通监控等典型场景,提供了具体的技术选型指南与工程落地考量。

m5n6o7的博客 308

摄像头模组CCM简介

摄像头模组,全称Camera Compact Module,简写为CCM。CCM 包含几大件: 镜头(lens)、音圈马达(VCM)、传感器(sensor)、软板(FPC)、图像处理芯片(DSP)。工作原理:物体通过镜头(lens)聚集的光,通过CMOS或CCD集成电路,把光信号转换成电信号,再经过内部图像处理器(ISP)转换成数字图像信号输出到数字信号处理器(DSP)加工处理,转换成标准的GRB、YUV等格式图像信号。摄像头模组主要由以下几个部分组成:镜头(Lens):将光线汇聚到图像传感器上。

m0_73482095的博客 1万+

编译时弹出“configure: error: libtool configure failed

解决方案: cp /usr/share/libtool/config/config.guess . cp /usr/share/libtool/config/config.sub . ./configure --enable-shared --enable-static--enable-lib64 --libdir=/usr/lib64

小慌慌的博客 1704

【第三方互联】12、支付宝(Alipay)授权第三方登录

我们创建了支付宝开放平台的网页&移动应用,审核通过后,我们需要拿到appid,支付宝公钥,私钥进项开发 一、添加应用信息至项目环境中 我们保存了 appid、应用私钥、支付宝公钥、支付宝回调地址等信息,这里的公钥为支付宝开放平台为我们生成的“支付宝公钥” 二、引入 Maven 依赖 <!-- 支付宝SDK --> <dependency> <g.........

JACKAL 21万+

libjson + lighttpd + fastcgi 编译

1: carit@carit-desktop:~/lighttpd/sbin$ sudo g++ -I/usr/include/fastcgi -I/usr/include/libjson/ -ljson -lfcgi++ echo-cpp1.cpp -o fastcgi .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New"

梦回吹角连营 1016

ABAP CDS 视图参数 parameter_list 详解与最佳实践:从语法、作用域到可运行范例

本文系统梳理了ABAP CDS视图的WITH PARAMETERS定义与使用。主要内容包括:1)参数声明语法及其在整条SELECT语句中的贯穿使用;2)参数在WHERE/HAVING/ON等位置的多种写法(:pname和$parameters.pname);3)参数在航空公司航线筛选等实际业务场景中的应用;4)参数与会话变量的协作策略;5)在JOIN ON、HAVING、CASE等高级用法中的实践;6)提供完整的CDS视图与ABAP程序示例,展示参数声明、使用及Open SQL传参方式。所有内容均基于SAP

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 385

倍福控制第三方伺服走CSV模式--以汇川伺服为例

在使用TwinCAT软件控制标准CiA402协议的EtherCAT伺服时使用TwinCAT软件NC自带的运动控制指令控制伺服,此时伺服驱动器一般工作在CSP/CSV/CST模式。最常见伺服驱动器工作在CSP模式,轨迹规划运行在TwinCAT软件,位置环速度环电流环运行在伺服驱动器中。该模式下速度波动较大,需要极度平稳的速度需要采用CSV模式。本文讲述的是伺服驱动器工作在CSV模式,此时轨迹规划和位置环均运行在TwinCAT软件,速度环电流环运行在伺服驱动器中。为了简化文字描述,本文采用图文结合的方式介绍伺服

weixin_41883890的博客 4855

浅尝LNMP部署

LNMP是众所周知的Web网站服务器架构环境,linux系统+nginx为HTTP和反向代理服务器+mysql数据库+php脚本语言组合成一个高性能、轻量、稳定、扩展性强的Web网站服务器架构环境。 注意:在安装操作系统的安装软件配置部分,建议选择“Server with GUI”,并选择“Development Tools”和“Compatibility Libraries”两项附加软件。同时在确保操作系统中gcc、libgcc、gcc-c++等编译器已经正确安装。 1、nignx安装 #依赖.

weixin_41109624的博客 253

基于上下文的 Listwise 重排模型(一):miRNN

2018年阿里团队提出的miRNN(Mutual Influence aware RNN)模型,首次将电商搜索重排建模为全局优化问题,通过RNN捕捉商品序列的相互影响,结合Beam Search生成最优排序,在淘宝搜索中实现GMV(商品交易总额)提升5%的突破。本文将结合论文细节与通俗案例,拆解这一工业级重排框架的核心逻辑。

进一步有进一步的欢喜~ 1935

libjson 编译和使用

最近想用box2dEdit来编辑一下比较复杂的图形然后倒入到自己有游戏里,但box2dEdit编辑后输出的是json文件。因为没有用C++解析json文件的经验,在网上找了很多有关json的开源项目,有cjson(这是c编写的)jsoncpp(C++的项目,但有人说它的移植性不够好)libjson(支持C和C++)由于对C有一种莫名的恐惧感,所以最后还是选择了libjson这个库。OK!先得吧文件...

huangyimo的专栏 5599

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Windows VS2019静态编译的libjsoncpp和libjson-rpc库

Windows VS2019静态编译的libjsoncpp和libjson-rpc库 去发现同类优质开源项目:https://gitcode.com/ 此仓库提供了使用Visual Studio 2019静态编译的libjsoncpp和libjson-rpc库文件,适用于X64架构。这些库文件可直接使用,并且包含了相应的sln工程文件,方便用户根据需要进行二次编译,支持X64或x86架构。 库文件...

gitblog_06710的博客 479

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Windows VS2019静态编译的libjsoncpp和libjson-rpc库:让JSON处理更高效

Windows VS2019静态编译的libjsoncpp和libjson-rpc库:让JSON处理更高效 去发现同类优质开源项目:https://gitcode.com/ 项目介绍 在现代软件开发中,JSON(JavaScript Object Notation)已成为数据交换的事实标准,广泛应用于Web服务、应用程序间通信等领域。为了帮助开发者更便捷地在Windows环境下处理JSON数据,本...

gitblog_06796的博客 400

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

libjson 编译和使用 - 3. libjson的C接口 API

继续上一篇libjson 编译和使用 - 2. 配置使用lib文件 这里我不想写太多,主要内容从libjson的document那里而来,在这里mark一下方便以后查找,这里先吧英文版的贴出来改天再翻译一下 C interface libjson has an interface that uses standard C types and a standard C interfac

cocos2d-x 学习之路 7627

libjson 编译和使用 - 2. 配置使用lib文件

继续上一篇编译后我们这次来讲怎么配置使用刚生产的lib文件。 1. 在之前的libjson所在的解决方案里新建一个控制台应用程序,叫TestLibjson。 2. 右键TestLibjson项目,选择属性。按下图设置导入libjson的头文件。(虽然我们已经编译成lib库文件,但我们还是要在我们的项目里加入头文件。) 3. 在属性里加入刚刚生产的libjson.lib文件。如下图设置

cocos2d-x 学习之路 6352

kali安装libjson

第一步:下载libjson从libjson官网上下载libjson 官网地址: http://projects.snarc.org/libjson/ 或者使用命令: git clone git://github.com/vincenthz/libjson/第二步:cd libjson/,为Makefile附加执行权限chmod +x Makefile第三步:编译安装:make make i

星空下的约定 1000

用libjson-glib处理json数据

json是一个轻量级的数据交换格式,在我们的一些大型程序时,可以用它来存储一些数据信息。前一篇演示了nodejs解析json的过程,今天我们要用我们传统的c语言来处理。 要用c语言来处理我们就需要依赖一些额外的库,虽然处理json的c库很多,但是今天我们就选择libjson-glib. 第一,在ubuntu14.04 安装libjson-glib $ sudo apt-get install libjson-glib-1.0-0 libjson-glib-dev 第二,准备json测试文件, test.js

波波诸葛伟 779

Cocos2d-x学习(五):cocos2d-x解析json(使用libjson库)

cocos2d-x很好,扩展性很好,但是其第三方库还不是很成熟,正如王哲所说,需要我们自己寻找,比如json解析和格式化。 我们的网络部分需要用到json,网络部分用的比较多的就是json,毕竟很轻量级么。。。上午我看到cocos2d-x论坛里关于json的第三方库有人提到了两个,一个是jsoncpp,一个是libjson,我上午首选的是jsoncpp,看其编译过程,是比较复杂的

明明 925
上一篇: webpy&apache&wsgi
下一篇: centos安装nginx配置webpy
chaimyu
博客等级 码龄16年 0粉丝 66原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值