Link1123:failure during conversion to coff:file invalid or corrupt

Source: Internet
Author: User
Tags visual studio 2010

The following compilation error was encountered when compiling a C project with Visual Studio 2010 today.
Fatal error link1123:failure during conversion to coff:file invalid or corrupt

Tried a lot of methods are useless, including Microsoft's official instructions
http://blog.csdn.net/xiaowei_cqu/article/details/18229649
http://fisnikhasani.com/error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-corrupt/
Http://msdn.microsoft.com/en-us/library/7dz62kfh.aspx

Start thinking that your project file has a problem, can be avoided by compiling options, and then create a new empty C + + project, found the same problem, know that the VS environment problem.
The continuation of the investigation found that the original vs used for the COFF format conversion tool Cvtres.exe was destroyed.
Executing cvtres.exe directly under the command line, the popup window says the process failed to start.

And the reason why Cvtres.exe was destroyed is because I just loaded the. Net Framework 4.5,.net Framework 4.5 comes with an updated cvtres.exe that makes the Cvtres.exe in the original VS2010 not move. And at vs compile time, vs comes with the cvtres.exe in front of the PATH environment variable, so the COFF conversion fails (but the VS report's errors are too misleading).
The Cvtres.exe in VS2010 (already broken)
C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\bin\cvtres.exe
C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\bin\amd64\cvtres.exe

. Net Framework 4.5 installation Cvtres.exe (available)
C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\cvtres.exe


Knowing why is a good solution. Delete or change the name of the two cvtres.exe in VS2010, so that vs can use the. Net Framework 4.5 installed Cvtres.exe, it's OK.

Link1123:failure during conversion to coff:file invalid or corrupt

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.