posts - 34,  comments - 5,  trackbacks - 0

 

问题:由于log4cpp-0.3.5rc3仅提供了vc6的工程文件,因此,使用vs2005打开后,需要进行转换。但是转换后,不能正确编译,提示Custom Build Step时出现了错误。

分析:因为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

适用范围:log4cpp项目、log4cppDLL项目的Debug和Release配置。同时,该方法适用于vs2003(vc7.1)。

原文出处:
http://www.cppblog.com/ace/archive/2007/01/27/18050.html
posted on 2008-04-13 22:22 披星戴月 阅读(993) 评论(0)  编辑 收藏 引用 所属分类: c/c++

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2007年9月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

常用链接

留言簿(2)

随笔分类

随笔档案

文章档案

相册

搜索

  •  

最新评论

阅读排行榜

评论排行榜