今天遇到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文件问题”。不肯定,请多试。
)
阅读(4589) | 评论(0) | 转发(0) |