LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏

\\


也可以这样一劳永逸:



官方解释:

https://msdn.microsoft.com/en-us/library/7dz62kfh.aspx

如下:

Linker Tools Error LNK1123

Visual Studio 2015
 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

failure during conversion to COFF: file invalid or corrupt

Input files must have the Common Object File Format (COFF) format. If an input file is not COFF, the linker automatically tries to convert 32-bit OMF objects to COFF, or runs CVTRES.EXE to convert resource files. This message indicates that the linker could not convert the file. This can also occur when using an incompatible version of CVTRES.EXE from another installation of Visual Studio, the Windows Development Kit, or .NET Framework.

System_CAPS_ICON_note.jpg Note

If you are running an earlier version of Visual Studio, automatic conversion may not be supported.

To fix the problem

  • Apply all service packs and updates for your version of Visual Studio. This is particularly important for Visual Studio 2010.

  • Try building with incremental linking disabled. On the menu bar, choose ProjectProperties. In the Property Pages dialog box, expand Configuration PropertiesLinker. Change the value ofEnable Incremental Linking to No.

  • Verify that the version of CVTRES.EXE found first in your PATH environment variable matches the version of the build tools, or the version of the Platform Toolset, used by your project.

  • Try turning off the Embed Manifest option. On the menu bar, choose ProjectProperties. In theProperty Pages dialog box, expand Configuration PropertiesManifest ToolInput and Output. Change the value of Embed Manifest to No.

  • Make sure that the file type is valid. For example, make sure that an OMF object is 32-bit and not 16-bit. For more information, see .Obj Files as Linker Input and Microsoft PE and COFF Specification.

  • Make sure that the file is not corrupt. Rebuild it, if necessary.

.Obj Files as Linker Input
EDITBIN Reference
DUMPBIN Reference






  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值