我是靠谱客的博主 洁净酸奶,这篇文章主要介绍Centos下安装Log4cxx,现在分享给大家,希望可以做个参考。

Log4cxx是开放源代码项目Apache Logging Service的子项目之一,用于为C++程序提供日志功能,以便开发者对目标程序进行调试和审计。
要使用log4cxx,首先要从官网下载,官网是http://logging.apache.org/log4cxx/index.html,目前的最新版本是0.10.0,下载地址:http://www.apache.org/dyn/closer.cgi/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz。安装方式可以使用ant,也可以使用gcc编译安装,本文以gcc编译安装为主。安装log4cxx需要apr支持,apr官网地址是:http://apr.apache.org/,需要下载apr和apr_util两个组件。


注意配置前需进行以下操作:
1.vim src/main/cpp/inputstreamreader.cpp
增加#include <string.h>;
#include <log4cxx/logstring.h>
#include <log4cxx/helpers/inputstreamreader.h>
#include <log4cxx/helpers/exception.h>
#include <log4cxx/helpers/pool.h>
#include <log4cxx/helpers/bytebuffer.h>
+
#include <string.h>
+
否则会出现inputstreamreader.cpp:66: error: 'memmove' was not dec

最后

以上就是洁净酸奶最近收集整理的关于Centos下安装Log4cxx的全部内容,更多相关Centos下安装Log4cxx内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(74)

评论列表共有 0 条评论

立即
投稿
返回
顶部