Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure during conversion to COFF: file invalid or corrupt

Tags:

visual-c++

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?

like image 781
user1646690 Avatar asked Sep 04 '12 15:09

user1646690


5 Answers

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)"
like image 177
Hamed Avatar answered Nov 13 '22 01:11

Hamed


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.

like image 34
nazanin Avatar answered Nov 13 '22 02:11

nazanin


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"!

like image 36
vikor Avatar answered Nov 13 '22 01:11

vikor


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

like image 9
Guest Avatar answered Nov 13 '22 03:11

Guest


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

like image 7
tterb50 Avatar answered Nov 13 '22 01:11

tterb50