Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5379635
  • 博文数量: 763
  • 博客积分: 12108
  • 博客等级: 上将
  • 技术积分: 15717
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-28 21:21
个人简介

业精于勤,荒于嬉

文章分类

全部博文(763)

文章存档

2018年(6)

2017年(15)

2016年(2)

2015年(31)

2014年(14)

2013年(87)

2012年(75)

2011年(94)

2010年(190)

2009年(38)

2008年(183)

2007年(28)

分类: C/C++

2011-08-22 13:56:57

今天遇到VS2008在debug版本下build失败,错误信息如下:
1>Linking...
1>CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

解决办法:在工程的rc文件中,搜索类似 RT_MANIFEST "res\\TestApp.manifest",然后删除掉就OK了


参考资料:

VS2005 has a different way to handle manifests. I would recommend to use the manifest tool and not your own solution.
The problem isthat the new compiler allows that source code emits manifest code (for the CRT, MFC etc.). This manifest code is collected and finally added to the module. You loose this feature. You have to add all this manifests manually.
Look into the conversion log, I am sure that there is a warning entry about this.

http://blog.csdn.net/anson_niu/archive/2009/05/06/4154440.aspx
从VC6.0升级到VS2008的工程。因为VC6.0的Manifest文件是外部的。 VS2008默认是自动生成嵌入式Manifest.所以两个会发生冲突:

error : CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:2, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

(推荐解决方案3)
解决方案:1. Project propert\ linker\ 启用增量链接:否;(关闭增量链接)
2. 设置工程属性->配置属性-> 清单工具->输入和输出->嵌入清单,选择[否]
3. 在工程的.rc文件里面删除了manifest块. 删除VC6.0外部Manifest文件。设置生成嵌入式清单,并在附加清单依赖项: Microsoft.Windows.Common-Controls。
( 有什么时候删除VC6.0外部Manifest文件后,编译会出现问题: 嵌入清单:否;编译。。
删除manifest块和VC6.0外部Manifest文件。编译。
嵌入清单:是; 编译。
这个方法或许可以解决 “删除VC6.0外部Manifest文件问题”。不肯定,请多试。
阅读(4496) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~