在vs2010中编译log4cxx-0.10.0详细方法
本文一共包含了17个步骤,按照下面的步骤就可以完成vs2010中编译log4cxx的工作了。
1. 下载 log4cxx 以及 apr 和 apr-util 源码:
a) http://www.apache.org/dyn/closer.cgi/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.zip
b) http://archive.apache.org/dist/apr/apr-1.2.11-win32-src.zip
c) http://archive.apache.org/dist/apr/apr-util-1.2.10-win32-src.zip
2. 将 3 个压缩包解压到同一个目录.如下图:
3. 将 apr-1.2.11 重命名为 apr, 将 apr-util-1.2.10 重命名为 apr-util.如下图:
4、打开cmd窗口,如下图所示:
5、在4中输入:cd D:\log4cxx_compile\apache-log4cxx-0.10.0 回车
然后输入:d: 回车后 切换至 apache-log4cxx-0.10.0 目录
6、在5中输入:configure.bat 回车
7. 在6的基础下dos窗口下继续输入: configure-aprutil.bat 回车
手动修改 apr-util\include\apu.hw 里的内容
#define APU_HAVE_APR_ICONV 1
改为
10. 使用VS2010打开 apache-log4cxx-0.10.0\projects 下的 log4cxx.dsw
打开工程会提示转换:
11、转换好后工程如下图:
12、将 log4cxx 设置为启动项.
设置前:
设置后:
13. 开始编译.log4cxx
出现
c) 将
#define LOG4CXX_LIST_DEF(N, T) \ template class LOG4CXX_EXPORT std::allocator<T>; \ template class LOG4CXX_EXPORT std::vector<T>; \ typedef std::vector<T> N
替换为: #define LOG4CXX_LIST_DEF(N, T) \ typedef std::vector<T> N
出现
双击第一行出错输出, 将 136 和 148 行的 #if MCAST_JOIN_SOURCE_GROUP 注释, 替换为 #if defined (group_source_req)
出现
'4>..\src\main\cpp\stringhelper.cpp(64): error C2039: “insert_iterator”: 不是“std”的成员' 等错误.
在该 .cpp 中(stringhelper.cpp) 加入头文件 #include<iterator>
出现 '无法解析的外部符号 xxx' 等错误.
将 apr, aprutil, xml 添加至 log4cxx 的引用中.(按照下面4副图的顺序操作)
17. 选择重新生成解决方案.
编译成功后:
到此log4cxx编译就完成了。
在vs2010中编译log4cxx-0.10.0详细方法的更多相关文章
- 在vs2010中编译log4cxx-0.10.0具体方法(从下载、编译、解决错误具体介绍)
一. 简单介绍 log4cxx是Java社区著名的log4j的c++移植版.用于为C++程序提供日志功能,以便开发人员对目标程序进行调试和审计,log4cxx是apache软件基金会的开源项目,基于A ...
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
在vs2010中编译log4cxx-0.10.0详细方法(从下载.编译.解决错误详细介绍) http://blog.sina.com.cn/s/blog_a459dcf501013tbn.html
- CentOS7 编译安装 nginx-1.10.0
对于NGINX 支持epoll模型 epoll模型的优点 定义: epoll是Linux内核为处理大批句柄而作改进的poll,是Linux下多路复用IO接口select/poll的增强版本,它能显著的 ...
- 在docker容器中编译hadoop 3.1.0
在docker容器中编译hadoop 3.1.0 优点:docker安装好之后可以一键部署编译环境,不用担心各种库不兼容等问题,编译失败率低. Hadoop 3.1.0 的源代码目录下有一个 `sta ...
- kafka0.9.0及0.10.0配置属性
问题导读1.borker包含哪些属性?2.Producer包含哪些属性?3.Consumer如何配置?borker(0.9.0及0.10.0)配置Kafka日志本身是由多个日志段组成(log segm ...
- Kafka 0.10.0
2.1 Producer API We encourage all new development to use the new Java producer. This client is produ ...
- Kafka: Producer (0.10.0.0)
转自:http://www.cnblogs.com/f1194361820/p/6048429.html 通过前面的架构简述,知道了Producer是用来产生消息记录,并将消息以异步的方式发送给指定的 ...
- Kafka版本升级 ( 0.10.0 -> 0.10.2 )
升级Kafka集群的版本其实很简单,核心步骤只需要4步,但是我们需要在升级的过程中确保每一步操作都不会“打扰”到producer和consumer的正常运转.为此,笔者在本机搭了一个测试环境进行实际的 ...
- VS2012 中不能安装ARCGIS 10.0 SDK的解决方法
问题描述 在ARCGIS 安装SDK时 就会出错 原因是ARCGIS SDK 10.0只能在VS2010中安装,因为我本机是安的VS2012所以安装不成功. 解决方法 一,在注册表中HKE ...
随机推荐
- 【刷题 Python Tip】题目1~5
[题目1]just print a+b give you two var a and b, print the value of a+b, just do it!! print (a + b) [题目 ...
- JSP指令 include 和forward
包括指令:include 静态包括 <%@include file="要包括的文件路径" %> 先将所包括 ...
- fseek/ftell/rewind/fgetpos/fsetpos函数使用-linux
程序: #include<stdio.h> int main(int argc,char *argv[]) { FILE * stream; fpos_t pos; stream = fo ...
- 字符串聚合技术(String Aggregation Techniques)
from: http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php String Aggregation ...
- BZOJ 4008: [HNOI2015]亚瑟王( dp )
dp(i, j)表示考虑了前i张牌, 然后还有j轮的概率. 考虑第i+1张牌: 发动的概率 : p = dp(i, j) * (1 - (1-p[i+1])^j) 没发动的概率 : dp(i, j) ...
- svn 查看某个时间段的记录
调出svn后,点击查找历史的按钮.
- jsp中利用java代码换行
从数据库中取出的10条商品数据分两行显示,每行5条. <% for(int i=0; i<latestProducts.size(); i++) { Product p = latestP ...
- Ecside基于数据库的过滤、分页、排序
首先ecside展现列表.排序.过滤(该三种操作以下简称为 RSF )的实现原理完全和原版EC一样, 如果您对原版EC的retrieveRowsCallback.sortRowsCallback.fi ...
- Android Studio 没有assets目录的问题
Where to place the assets folder in Android Studio If you are having problems with asset files not ...
- jQuery无缝滚动向上
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...