9

When i tried to debug project on QT 5.0 Creator (MSVC2010(x86)compiler 10.0) i have this error:

LNK1123: failure during conversion to COFF: file invalid or corrupt

I googled and i saw some solutions but only for Visual Studio 2012, i need solution of this problem for QT Creator.

Thank you.

Before this problem i had problem with MSVC(x86)compiler 11.0, and i was installed MSVC2010(x86)compiler 10.0 and now i have this error.

user1814358
  • 619
  • 3
  • 8
  • 17
  • 4
    This usually happens when you upgrade from VS2010 to VS2012. See this: http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c The answer from CaterHatterPillar worked for me. Hope it helps. – Vaibhav Desai Mar 05 '13 at 18:32
  • Sometimes i ask myself, why i installed vs2012. Thank you, now works fine. – user1814358 Mar 06 '13 at 00:00
  • Exactly like what @VaibhavDesai said. [This particular answer](http://stackoverflow.com/a/29010876/999943) from that post worked for me. Has to do with .NET 4.5 v .NET 4.0 and fixing the cvtres.exe. – phyatt Aug 29 '16 at 23:08

3 Answers3

13

Set QMAKE_LFLAGS += /INCREMENTAL:NO in the file .pro

TN888
  • 7,659
  • 9
  • 48
  • 84
user2849240
  • 131
  • 1
  • 3
2

In addition to QMAKE_LFLAGS += /INCREMENTAL:NO, I "cleaned" and also removed the output directory to force a fresh recompile. Then the tutorial application built.

IKavanagh
  • 6,089
  • 11
  • 42
  • 47
Cathy
  • 67
  • 3
1

I had the same problem, but it was solved by marking in Build -> "Open build and run kit selector" the MSVC2012 64bit version, instead of the 32 bit. Hope it helps!

gmm
  • 943
  • 1
  • 17
  • 30