首页 | 新闻资讯 | 培训认证 | 安全管理 | 病毒分析 | 安全协议 | 网络安全 | 防火墙 | 黑客技术
DB安全 | Web安全 | 入侵检测 | 安全审计 | 设备安全 | 备份恢复 | 安全标准 | 法律法规 | 无线安全
OS安全 | PKI与PMI | 病毒防治 | 隔离网闸 | XML安全 | 网管专区 | 经典案例 | 技术论坛 |  
+ 文章搜索 +
当前位置:首页>>原创作品>>开发方面>>正文
关键字:
范 围:
※相关文章※
※推荐文章※
VC6下编译log4cpp0.3.5rc1
作者:rainbow 文章出处:中国信息安全组织 发布时间:2005-10-31 点击: 字体: 【

VC6下编译log4cpp0.3.5rc1
1、下载
到sourceforge的log4cpp项目的主页上下载
下面是网址
http://sourceforge.net/project/showfiles.php?group_id=15190

2、解压到特定目录
3、编译
log4cpp-0.3.5rc1\msvc6\msvc6.dsw
出现

d:\log4cpp-0.3.5rc1\include\log4cpp\priority.hh(65) : error C2258: illegal pure syntax, must be '= 0'
d:\log4cpp-0.3.5rc1\include\log4cpp\priority.hh(65) : error C2252: 'MESSAGE_SIZE' : pure specifier can only be specified for functions
d:\log4cpp-0.3.5rc1\include\log4cpp\threading\msthreads.hh(160) : fatal error C1506: unrecoverable block scoping error

错误提示

解决方法:

出错位置priority.hh

 class LOG4CPP_EXPORT Priority {
        public:
  static const int MESSAGE_SIZE=8;

///// Some other declarations //////
};

解决方法

将代码改成

static const int MESSAGE_SIZE;

在priority.cpp 里加一句


#include "PortabilityImpl.hh"
#include
#include

const int log4cpp::Priority::MESSAGE_SIZE=8;

保存重新编译

如果出现*.pch不要rebuild整个工程。单独选中一个工程build就可以了。
生成的结果有静态库,也有动态库,根据自己的需要使用。

返回顶部↑】 【推荐好友】 【查看评论
用户名: 新注册) 密码: 匿名评论 [查看评论] 发表评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  Copyright © 2004-2005 infosecurity.org.cn . All Rights Reserved
版权所有:中国信息安全组织 系统管理:webmaster@infosecurity.net.cn
本站部分资源来自互联网,如有侵犯您的版权或其他问题,请通知管理员,我们会尽快处理!