libjson + lighttpd + fastcgi 编译

json-lib-2.4 依赖包 json的核心包:json-lib-2.4-jdk15.jar;json-2.4所依赖的jar包:commons-beanutils-1.8.0.jar,commons-collections-3.2.1.jar,commons-lang-2.5.jar,commons-logging-1.1.1.jar,ezmorph-1.0.6.jar;以及和struts2整合所需的jar包:struts2-json-plugin-2.3.24.1.jar 立即下载
  1: carit@carit-desktop:~/lighttpd/sbin$ sudo g++ -I/usr/include/fastcgi -I/usr/include/libjson/ -ljson -lfcgi++ echo-cpp1.cpp -o fastcgi

环境:

Ubuntu 9.04

libjson_7.1.1.zip

lighttpd-1.4.28.tar.gz

fcgi-2.4.0.tar.gz

编译 libjson 的共享库时出现问题 没办法编译出共享库

后来修改了一下MakeFile才解决。

把原来的两行修改成如下

  1: BUILD_TYPE="debug"
  2: SHARED=1

JSONOptions.h 文件也有作修改,要不然会编译不通过。

忘记修改了哪里,没办法全都贴出来吧。

#ifndef JSON_OPTIONS_H
#define JSON_OPTIONS_H
/**
 *  This file holds all of the compiling options for easy access and so
 *  that you don't have to remember them, or look them up all the time
 */
/*
 *  JSON_LIBRARY must be declared if libjson is compiled as a static or dynamic 
 *  library.  This exposes a C-style interface, but none of the inner workings of libjson
 */
//#define JSON_LIBRARY
/*
 *  JSON_STRICT removes all of libjson's extensions.  Meaning no comments, no special numbers
 */
//#define JSON_STRICT
/*
 *  JSON_DEBUG is used to perform extra error checking.  Because libjson usually 
 *  does on the fly parsing, validation is impossible, so this option will allow
 *  you to register an error callback so that you can record what is going wrong 
 *  before the library crashes.  This option does not protect from these errors,
 *  it simply tells you about them, which is nice for debugging, but not preferable
 *  for release candidates
 */
//#define JSON_DEBUG
/*
 *  JSON_ISO_STRICT turns off all code that uses non-standard C++.  This removes all
 *  references to long long and long double as well as a few others
 */
//#define JSON_ISO_STRICT
/*
 *  JSON_SAFE performs similarly to JSON_DEBUG, except this option does protect
 *  from the errors that it encounters.  This option is recommended for those who
 *  feel it's possible for their program to encounter invalid json.
 */
#define JSON_SAFE
/*
 *  JSON_STDERROR routes error messages to cerr instead of a callback, this 
 *  option hides the callback registering function.  This will usually display
 *  messages in the console
 */
//#define JSON_STDERROR
/*
 *  JSON_PREPARSE causes all parsing to be done immediately.  By default, libjson
 *  parses nodes on the fly as they are needed, this makes parsing much faster if
 *  your program gets a lot of information that it doesn't need.  An example of
 *  this would be a client application communicating with a server if the server
 *  returns things like last modified date and other things that you don't use.
 */
//#define JSON_PREPARSE
/*
 *  JSON_LESS_MEMORY will force libjson to let go of memory as quickly as it can
 *  this is recommended for software that has to run on less than optimal machines.
 *  It will cut libjson's memory usage by about 20%, but also run slightly slower.
 *  It's recommended that you also compile using the -Os option, as this will also
 *  reduce the size of the library
 */
//#define JSON_LESS_MEMORY
/*
 *  JSON_UNICODE tells libjson to use wstrings instead of regular strings, this
 *  means that libjson supports the full array of unicode characters, but also takes
 *  much more memory and processing power.
 */
//#define JSON_UNICODE
/*
 *  JSON_REF_COUNT causes libjson to reference count JSONNodes, which makes copying
 *  and passing them around much faster.  It is recommended that this stay on for
 *  most uses
 */
#define JSON_REF_COUNT
/*
 *  JSON_BINARY is used to support binary, which is base64 encoded and decoded by libjson,
 *  if this option is not turned on, no base64 support is included
 */
//#define JSON_BINARY
/*
 *  JSON_EXPOSE_BASE64 is used to turn on the functionality of libjson's base64 encoding
 *  and decoding.  This may be useful if you want to obfuscate your json, or send binary data over
 *  a network
 */
//#define JSON_EXPOSE_BASE64
/*
 *  JSON_ITERATORS turns on all of libjson's iterating functionality.  This would usually
 *  only be turned off while compiling for use with C
 */
#define JSON_ITERATORS
/*
 *  JSON_STREAM turns on libjson's streaming functionality.  This allows you to give parts of 
 *  your json into a stream, which will automatically hit a callback when full nodes are
 *  completed
 */
//#define JSON_STREAM
/*
 *  JSON_MEMORY_CALLBACKS exposes functions to register callbacks for allocating, resizing,
 *  and freeing memory.  Because libjson is designed for costomizability, it is feasible
 *  that some users would like to further add speed by having the library utilize a memory
 *  pool.  With this option turned on, the default behavior is still done internally unless
 *  a callback is registered.  So you can have this option on and mot use it.
 */
//#define JSON_MEMORY_CALLBACKS
/*
 *  JSON_MEMORY_MANAGE is used to create functionality to automatically track and clean
 *  up memory that has been allocated by the user.  This includes strings, binary data, and
 *  nodes.  It also exposes bulk delete functions.
 */
//#define JSON_MEMORY_MANAGE
/*
 *  JSON_MUTEX_CALLBACKS exposes functions to register callbacks to lock and unlock
 *  mutexs and functions to lock and unlock JSONNodes and all of it's children.  This 
 *  does not prevent other threads from accessing the node, but will prevent them from
 *  locking it. It is much easier for the end programmer to allow libjson to manage
 *  your mutexs because of reference counting and manipulating trees, libjson automatically
 *  tracks mutex controls for you, so you only ever lock what you need to
 */
//#define JSON_MUTEX_CALLBACKS
/*
 *  JSON_MUTEX_MANAGE lets you set mutexes and forget them, libjson will not only keep
 *  track of the mutex, but also keep a count of how many nodes are using it, and delete
 *  it when there are no more references
 */
//#define JSON_MUTEX_MANAGE
/*
 *  JSON_NO_C_CONSTS removes consts from the C interface.  It still acts the same way, but
 *  this may be useful for using the header with languages or variants that don't have const
 */
//#define JSON_NO_C_CONSTS
/*
 *  JSON_OCTAL allows libjson to use octal values in numbers.
 */
//#define JSON_OCTAL
/*
 *  JSON_WRITE_PRIORITY turns on libjson's writing capabilties.  Without this libjson can only
 *  read and parse json, this allows it to write back out.  Changing the value of the writer
 *  changes how libjson compiles, and how fast it will go when writing
 */
#define JSON_WRITE_PRIORITY MED
/*
 *  JSON_READ_PRIORITY turns on libjson's reading capabilties.  Changing the value of the reader
 *  changes how libjson compiles, and how fast it will go when writing
 */
#define JSON_READ_PRIORITY HIGH
/*
 *  JSON_NEWLINE affects how libjson writes.  If this option is turned on, libjson
 *  will use whatever it's defined as for the newline signifier, otherwise, it will use 
 *  standard unix /n.
 */
//#define JSON_NEWLINE "/r/n"  ///r/n is standard for most windows and dos programs
/*
 *  JSON_INDENT affects how libjson writes.  If this option is turned on, libjson
 *  will use /t to indent formatted json, otherwise it will use the number of characters
 *  that you specify.  If this is not turned on, then it will use the tab (/t) character
 */
//#define JSON_INDENT "    "
/*
 *  JSON_ESCAPE_WRITES tells the libjson engine to escape special characters when it writes
 *  out.  If this option is turned off, the json it outputs may not adhere to JSON standards
 */
#define JSON_ESCAPE_WRITES
/*
 *  JSON_COMMENTS tells libjson to store and write comments.  libjson always supports
 *  parsing json that has comments in it as it simply ignores them, but with this option
 *  it keeps the comments and allows you to insert further comments
 */
//#define JSON_COMMENTS
/*
 *  JSON_WRITE_BASH_COMMENTS will cause libjson to write all comments in bash (#) style
 *  if this option is not turned on, then it will use C-style comments.  Bash comments are
 *  all single line
 */
//#define JSON_WRITE_BASH_COMMENTS
/*
 *  JSON_WRITE_SINGLE_LINE_COMMENTS will cause libjson to write all comments in using //
 *  notation, or (#) if that option is on.  Some parsers do not support multiline C comments
 *  although, this option is not needed for bash comments, as they are all single line anyway
 */
//#define JSON_WRITE_SINGLE_LINE_COMMENTS
/*
 *  JSON_ARRAY_SIZE_ON_ON_LINE allows you to put small arrays of primitives all on one line
 *  in a write_formatted.  This is common for tuples, like coordinates.  If must be defined 
 *  as an integer
 */
//#define JSON_ARRAY_SIZE_ON_ONE_LINE 2
/*
 *  JSON_VALIDATE turns on validation features of libjson.  This option requires JSON_SAFE
 */
//#define JSON_VALIDATE
/*
 *  JSON_CASE_INSENSITIVE_FUNCTIONS turns on funtions for finding child nodes in a case-
 *  insenititve way
 */
//#define JSON_CASE_INSENSITIVE_FUNCTIONS
/*
 *  JSON_INDEX_TYPE allows you th change the size type for the children functions. If this 
 *  option is not used then unsigned int is used.  This option is useful for cutting down
 *  on memory, or using huge numbers of child nodes (over 4 billion)
 */
//#define JSON_INDEX_TYPE unsigned int
/*
 *  JSON_BOOL_TYPE lets you change the bool type for the C interface.  Because before C99 there
 *  was no bool, and even then it's just a typedef, you may want to use something else.  If this 
 *  is not defined, it will revert to int
 */
//#define JSON_BOOL_TYPE char
/*
 *  JSON_INT_TYPE lets you change the int type for as_int.  If you ommit this option, the default
 *  long will be used
 */
//#define JSON_INT_TYPE long
/*
 *  JSON_STRING_HEADER allows you to change the type of string that libjson uses both for the
 *  interface and internally.  It must implement most of the STL string interface, but not all
 *  of it.  Things like wxString or QString should wourk without much trouble
 */
//#define JSON_STRING_HEADER "../TestSuite/StringTest.h"
/*
 *  JSON_UNIT_TEST is used to maintain and debug the libjson.  It makes all private
 *  members and functions public so that tests can do checks of the inner workings
 *  of libjson.  This should not be turned on by end users.
 */
//#define JSON_UNIT_TEST
/*
 *  JSON_NO_EXCEPTIONS turns off any exception trhowing by the library.  It may still use exceptions
 *  internally, but the interface will never throw anything.
 */
//#define JSON_NO_EXCEPTIONS
/*
 *  JSON_DEPRECATED_FUNCTIONS turns on functions that have been deprecated, this is for backwards
 *  compatibility between major releases.  It is highly recommended that you move your functions
 *  over to the new equivalents
 */
#define JSON_DEPRECATED_FUNCTIONS
#endif
json-lib-2.4-jdk15包含依赖JAR包和简单示例【可下载,经验证可用】 找了好久都下载不了,今天共享出来吧 json-lib-2.4-jdk15.jar|commons-beanutils-1.8.3.jar|commons-collections-3.2.1.jar|commons-lang-2.6.jar|commons-logging-1.1.1.jar|ezmorph-1.0.6.jar|简单json-lib示例工程,真心分享,希望能够帮到你! 立即下载

相关推荐

Oracle PLM Agile936 单点登录配置方式

Oracle PLM Agile936 单点登录配置方式

Jay的个人博客 829

libjson编译和使用

libjson编译和使用 下载libjson_7.6.1 libjson.vcproj 240行少一个">",加上 JSONOptions.h 注释此行: #define JSON_DEPRECATED_FUNCTIONS 调试模式 #define JSON_DEBUG 或者在工程里面定义

chaimyu的专栏 926

基于强化学习方法的PID参数整定

前言 PID控制器在工业界应用非常广泛,但是PID的参数调节一般需要人工根据经验法来试。对于有经验的工程师来说,一般试几次就可以获得满足调节的参数。然而对于新手工程师却很难确定一套比较好的参数。 这里我们采用强化学习的方法来调节PID参数。 这个例子展示了如何使用双延迟深度确定性策略梯度(TD3:twin-delayed deep deterministic policy gradient)强化学习算法来调整PI控制器。整定控制器的性能与使用Control System Tuner app整定的控制器的性能

weixin_42188287的博客 2万+

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

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

HackProgramer的专栏 1054

WinCC与PLC在西门子逻辑赛项中的通信配置避坑指南

本文针对西门子逻辑赛项中WinCC与PLC通信配置的常见问题,提供了一套实战避坑指南。重点解析了WinCC、PLC与EET仿真平台的三角通信架构,强调了IP地址规划、防火墙设置等关键环节的注意事项,并给出了系统化的故障诊断流程与排查技巧,帮助选手和技术人员快速定位并解决通信故障,确保监控系统稳定运行。

weixin_29165725的博客 116

【论文+CAD图纸】光储充一体化微电网设计

近些年来,我国的经济发展迅速,对能源的需求不断增长,也加重了对环境的破坏,违背了我国的可持续发展战略。所以迫切需要寻找新型能源。由于太阳能在使用时不会产生污染,所以太阳能逐渐受到人们的重视。我国的太阳能资源丰富,具有的开发利用潜力。特别是近些年“光储充”一体化充电站为高科技绿色充电模式,“以光养桩”使光伏、储能、智能充电协同,智能微电网与公共电网互动,本设计对探索清洁可再生能源在民用场合的应用,有着重大的理论和工程价值。本文综述国内外相关光伏发电的成果和发展现状;

weixin_761237174的博客 943

编译时弹出“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

第4章 本地一键部署(新手首选)

本文介绍了OpenClaw的本地部署方法,特别适合新手用户。部署过程仅需执行一条命令,通过自动脚本完成安装和配置向导。安装完成后,用户可通过终端TUI或Web控制面板验证部署是否成功。文章还提供了常见问题的排查方法,包括端口占用、权限不足、APIKey无效和安装卡顿等情况。整个部署流程简单直观,无需手动修改配置文件,适合快速搭建使用。

eastyuxiao的专栏 202

libjson 编译和使用 - 1. 编译

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

cocos2d-x 学习之路 1万+

在win10系统上安装opnet14.5注意事项和步聚

opnet 14.5安装避坑!

miracle_eicont的专栏 1051

从 central AAE 到 non-central AAE,重新理解 SAP PI 和 AEX 里的适配器引擎部署策略

摘要: SAP PI 项目中后期常面临运行时部署问题(如流量、隔离、权限等),而 Advanced Adapter Engine(AAE)是关键组件。AAE 分为 central(与集成服务器绑定,适合简单场景)和 non-central(独立部署,适合跨区域复杂网络)。non-central AAE 支持本地用户管理,增强独立性但增加治理复杂度。AEX(Java-only 轻量版 PI)与 non-central AAE 不同,前者是安装选项,后者是运行时部署方式。实际应用中,non-central AA

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

浅尝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

allegro如何设置走线等长

设置走线等长!

weixin_42499230的博客 6956

centos编译java失败_CentOS编译安装PHP常见错误及解决办法

1.configure: error: No curses/termcap library foundyum -y install ncurses-devel2.configure: error: xml2-config not found. Please check your libxml2 installation.yum -y install libxml2 libxml2-devel3.c...

weixin_39584571的博客 210

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

解决./configure ,make,make install的报错

解决./configure ,make,make install的报错 2011-01-16 21:53 转载:http://hi.baidu.com/haichao_xjtu/blog/item/154c4ec00fc83c090ff477a0.html

香巴拉 4160

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

CentOS 编译错误+配置错误解决方法集合

CentOS 编译错误

lanyanleio的专栏 5383

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

json-lib系列包报错原因

我的JDK是1.6,json-lib换了好几个版本还是不行,jsonArray与list之间的转换始终进行不了,之前也用到jsonArray与String之间的转换报错,不得不改用org.json.jar那个包;今天再次遇到这个问题,我决心找出原因: Json-lib comes in two flavors, depending on the jdk compatibility. js

ITbasketplayer的专栏 5712

已解决:json-lib包引入失败,被这个坑了好几次了

要想使用json-lib的依赖必须加入<classifier>jdk15</classifier> 这一行,否则就导入依赖时就会失败报错,下载不下来jar包,因为json-lib支持的是jdk1.5,所以需要声明下<dependency>      <groupId>net.sf.json-lib</groupId>      <a...

lizexing1的博客 7542

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

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

cocos2d-x 学习之路 6352

lighttpd+fastcgi+Raphters+qdecoder+json-c环境搭建

lighttpd+fcgi环境搭建lighttpd+fcgi开发资源下载与编译lighttpd+fcgi资源下载`lighttpd+fcgi`编译安装 lighttpd+fcgi开发 这里简单介绍一下lighttpd+fcgi开发流程,也就是开篇文章。 资源下载与编译 lighttpd+fcgi资源下载 lighttpd下载地址(提取码:2sbq) fcgi下载地址(提取码:g9r8) lighttpd+fcgi编译安装 安装系统的基本环境配置如下: ubuntu20.04 64bit 安装lighttp

wit_yuan的专栏 1060

ubuntu下libjson-c库的使用问题备忘

libjson-c的使用

jk110333的专栏 1万+

configure: error: Your operating system's lex is insufficient to compile libpcap.

configure: error: Your operating system's lex is insufficient to compile  libpcap. 缺少flex包的问题解决方法:sudo apt-get install flex

wsclinux的专栏 3117

【人工智能驱动的电催化研究-13】电催化数据类型与四主线的数据地图

本节以电催化科研问题为起点,介绍实验、密度泛函理论、连续介质模拟和图像数据的含义,建立催化剂、界面、反应动力学与反应器四条主线的数据地图。课程强调数据来源与存储格式的区别,说明表格、曲线、原子结构、空间场和图像各自需要保留的对象、坐标、单位及条件。通过电流密度和法拉第效率的手算,理解数据转换为何依赖物理定义。结合真实文献与教学清单,使用Python检查记录身份并绘制分类图,区分文件数量、观测点数和独立研究对象。形成可追溯数据资产清单,明确已有证据、缺失信息与使用边界,为后续科研问题建模奠定基础。

2402_84593233的博客 1126
上一篇: 利用doxygen 生成antlr C++ API
下一篇: Android 学习笔记
bndxgae
博客等级 码龄21年 24粉丝 28原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值