惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
S
Securelist
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
W
WeLiveSecurity
P
Palo Alto Networks Blog
O
OpenAI News
V2EX - 技术
V2EX - 技术
H
Heimdal Security Blog
L
Lohrmann on Cybersecurity
NISL@THU
NISL@THU
T
Tor Project blog
T
Threatpost
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
A
Arctic Wolf
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Latest news
Latest news
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tenable Blog
量子位
L
LINUX DO - 最新话题
Webroot Blog
Webroot Blog
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
Hacker News: Ask HN
Hacker News: Ask HN
U
Unit 42
T
Tailwind CSS Blog
WordPress大学
WordPress大学
N
News | PayPal Newsroom
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Stack Overflow Blog
Stack Overflow Blog
Cloudbric
Cloudbric
C
Check Point Blog
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Hacker News
The Hacker News
B
Blog

博客园 - hcfalan

Mybatis分页功能 安聊服务端Netty的应用 安聊系统1.0发布 VC中发送电子邮件 自绘窗口边框和标题栏 Windows下生产者-消费者问题的解法 Javascript 时间日期转换 Java Threading - Consumer&Producer Boost socket 同步编程示例(服务端,客户端) MFC CSocket的跨线程问题 用于主题检测的临时日志(54b8134e-5e4a-46fc-95af-c75ccf06d66e - 3bfe001a-32de-4114-a6b4-4005b770f6d7) 网络电话 VC 剪贴板操作 The 1st Boost Serial Demo - hcfalan MS Proxy FTP Sample 《斯坦福大学开放课程: 编程方法学》 适合孩子的书籍 一个最经典的线程类(转) 应用MFC开发高级应用程序(转)
VC2005下编译log4cpp的修正方法 - hcfalan - 博客园
hcfalan · 2010-12-25 · via 博客园 - hcfalan

现象:

   在vc2005下面编译下载过来的log4cpp源代码,由于log4cpp1.0仅提供了vc6的工程文件,因此,使用vs2005打开后,需要进行转换。但是转换后,不能正确编译,提示Custom Build Step时出现了错误,报错为:

1>正在执行自定义生成步骤
1>系统找不到指定的路径。
1>系统找不到指定的路径。
1>系统找不到指定的路径。
1>Project : error PRJ0019: 工具从"正在执行自定义生成步骤"
1>正在创建浏览信息文件...
1>Microsoft ?????????? Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : : No such file or directory
1>生成日志保存在“file://d:\log4cpp-1.0\msvc6\log4cpp\Debug\BuildLog.htm”
1>log4cpp - 2 个错误,0 个警告
========== 全部重新生成: 0 已成功, 1 已失败, 0 已跳过 ==========

分析:

   因为log4cpp在生成NTEventLogAppender.dll时,需要连接NTEventLogCategories.mc文件。所以,项目设置了自定义的生成步骤去生成NTEventLogAppender.dll。但从vc6的工程文件转换时,这些步骤却没有正确的转换过来。从而出现上述问题。

解决方法:

重新填写Custom Build Step项。

其中,CommandLine填写以下内容:

if not exist $(OutDir) md $(OutDir)
"mc.exe" -h $(OutDir) -r $(OutDir) $(SolutionDir)\NTEventLogCategories.mc
"RC.exe" -r -fo $(OutDir)\$(InputName).res $(ProjectDir)\$(InputName).rc
"link.exe" /MACHINE:IX86 -dll -noentry -out:$(OutDir)\NTEventLogAppender.dll $(OutDir)\$(InputName).res

Outputs填写:

$(OutDir)\NTEventLogAppender.dll

适用范围:

log4cppDLL项目的Debug和Release配置。

分割线----------------------------------------------------------------------------------------------------------------------------------

然后编译,8个连接报错,符号找不到

需要将源代码目录下的Localtime.cpp和FactoryParams.cpp两个文件添加到项目中,然后再次编译。即可成功。