安装Visual Studio 2012发行预览版后出现错误"LINK:致命错误LNK1123:转换为COFF期间失败:文件无效或损坏" [英] Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview

查看:102
本文介绍了安装Visual Studio 2012发行预览版后出现错误"LINK:致命错误LNK1123:转换为COFF期间失败:文件无效或损坏"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Visual Studio 2012 Release Preview,看起来不错,但是现在当我尝试使用Visual Studio 2010编译C ++项目时,出现以下错误消息:

I've installed Visual Studio 2012 Release Preview, and it appears to be fine, but now when I try to use Visual Studio 2010 to compile C++ projects, I get the following error message:

LINK:致命错误LNK1123:转换为COFF时失败:文件无效或损坏

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

我不太确定这一点,但这似乎与其中包含.rc(资源)文件的项目有关.

I'm not 100% sure of this, but it seems to be related to projects that have .rc (resource) files in them.

我曾尝试通过添加/删除程序修复Visual Studio 2010并重新启动,但这没有效果.

I've tried repairing Visual Studio 2010 from Add/Remove programs and rebooting, but this has no effect.

如果在设置为使用Visual Studio 2010工具集时使用Visual Studio 2012 RC编译C ++项目,也会遇到相同的错误.升级到Visual Studio 2011工具集可以解决此问题(但我当然不想在生产代码中这样做).

I also get the same error if I use Visual Studio 2012 RC to compile the C++ projects when set to use the Visual Studio 2010 toolset. Upgrading to the Visual Studio 2011 toolset fixes the problem (but of course I don't want to do this for production code).

更新:我已卸载Visual Studio 2012 ,重新启动后,问题仍然存在!救命!

Update: I've uninstalled Visual Studio 2012, rebooted, and the problem still persists! Help!

推荐答案

总结:

  • 通过进入

  • Either disable incremental linking, by going to

Project Properties 
   -> Configuration Properties 
       -> Linker (General) 
          -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"

  • 或安装VS2010 SP1.

  • or install VS2010 SP1.

    编辑(@CraigRinger):请注意,安装VS 2010 SP1将删除64位编译器.您需要安装

    Edits (@CraigRinger): Note that installing VS 2010 SP1 will remove the 64-bit compilers. You need to install the VS 2010 SP1 compiler pack to get them back.

    这会影响用于Windows 7和.NET 4.0的Microsoft Windows SDK 7.1 ,以及 Visual Studio 2010 .

    这篇关于安装Visual Studio 2012发行预览版后出现错误"LINK:致命错误LNK1123:转换为COFF期间失败:文件无效或损坏"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆