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