Failure during conversion to COFF: file invalid or corrupt

Visual C++

Visual C++ Problem Overview


When I try building just a simple program into VS2010, compiling succeeds yet when I try to build the solution it gives me this error:

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

What am I doing wrong?

Visual C++ Solutions


Solution 1 - Visual C++

I had this issue and I solved it with this thread

disable incremental linking, by going to

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

Solution 2 - Visual C++

I had this issue after installing dotnetframework4.5.
Open path below:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" ( in 64 bits machine)
or
"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin" (in 32 bits machine)
In this path find file cvtres.exe and rename it to cvtres1.exe then compile your project again.

Solution 3 - Visual C++

This issue occurred after Visual Studio 2012 installation. The issue resolved by replacing the cvtres.exe from VS2010 with the one from VS2012.

Thank you to "social.msdn"!

Solution 4 - Visual C++

Had to install VS 2010 SP1 in order to get it to work again for myself. Lame microsoft.

Solution 5 - Visual C++

Do you have Visual Studio 2012 installed as well? If so, 2012 stomps your 2010 IDE, possibly because of compatibility issues with .NET 4.5 and .NET 4.0.

See http://social.msdn.microsoft.com/Forums/da-DK/vssetup/thread/d10adba0-e082-494a-bb16-2bfc039faa80

Solution 6 - Visual C++

I am using Visual Studio 2010.

This happened to me when I installed .NET 4.5. Uninstall of .NET 4.5 and install of .NET 4.0 helped me and error messages disappeared.

Solution 7 - Visual C++

If you have installed VS2012 as well, the old cvtres file will no longer work.

> Try removing the file (I simply renamed):
C:\Program Files > (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe

You can also debug using the /VERBOSE linker option in order to get more information regarding the linker error. There you should see an error message that the invoke to cvtres fails.

Solution 8 - Visual C++

In my case it was just caused because there was not enough space on the disk for cvtres.exe to write the files it had to.

The error was preceded by this line

CVTRES : fatal error CVT1106: cannot write to file

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1646690View Question on Stackoverflow
Solution 1 - Visual C++HamedView Answer on Stackoverflow
Solution 2 - Visual C++nazaninView Answer on Stackoverflow
Solution 3 - Visual C++vikorView Answer on Stackoverflow
Solution 4 - Visual C++GuestView Answer on Stackoverflow
Solution 5 - Visual C++tterb50View Answer on Stackoverflow
Solution 6 - Visual C++tista3View Answer on Stackoverflow
Solution 7 - Visual C++Merav KochaviView Answer on Stackoverflow
Solution 8 - Visual C++kosnikView Answer on Stackoverflow