LinkIssue: Error & #39; LINK: fatal error LNK1123: failure during conversion to COFF: file invalid or cor, reject 4failurefatal

Source: Internet
Author: User

LinkIssue: Error 'link: fatal error LNK1123: failure during conversion to COFF: file invalid or cor, limit 4failurefatal

The following error may occur during link compilation using Visual Studio:

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

The following solutions are available on the Internet:

1. disable incremental linking

 

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

2. turning off "Embed Manifest"

 

 

However, none of these methods work.

Issue root cause: more than one version of Utility: cvtres.exe is generated during system update or software upgrade.

D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe

C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe

 

The cvtres.exe file under the vsdirectory is not working. If the Utinity is in front of the path, linker feels that it needs to convert a. res file to the COFF object format. link will fail and Display error: LNK1123

 

Method: Delete the old Utility cvtres.exeunder VS and rename it cvtres.exe _ old. Or reschedule the PATH variable.

 

References:

http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval

-------------------

 

Solution for error: LNK1123: failure during conversion to COFF: file invalid or upt errors [Qt] [VS2010]

 

Recently, I had to reinstall VS2010 Qt development tools because I had to reinstall the system by replacing the hard disk. There is no problem in the installation process. After the installation is complete, click an example to test whether it is easy to use, and an error message appears in the title. I processed it once before, and I forgot it after a long time, so another search was done. This time, I have a long mind and noted it down, so that I will not forget it again. (I have to despise myself when I write my blog or something ).

 

Start with the question. The prompt indicates that the conversion to the COFF file failed due to an error (after VS2010 is installed, there is generally no [file invalid] error ).

The program cvtres.exe is used to complete the conversion. The root cause of the above error is that multiple versions of cvtres.exe exist in the system.

Version in the system directory:C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe

Version under the VS directory:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe

For a 64-bit systemC:\Windows\Microsoft.NET\Framework64\v4.0.30319\cvtres.exe

However, the two versions of the Framework and Framework64 are the same, and the versions under the VS directory are generally newer due to system updates.

 

 

 

This solution is obviously simple. You only need to rename or delete the old version, but I generally prefer to rename it, such as adding-old to the end.

To put it bluntly, when looking for the cvtres.exe program under the system directory, there is an XML file named cvtres.exe (the blogger does not display the file extension ). Remember not to make a mistake when you look for it.

Well, this article will be recorded here. It's not easy to get into the habit of writing a blog. T (the layout is a little bad). Continue to work hard!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.