[CMAKE] [Fixed] fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt.

Error LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt appear often on Visual C++ 2010 and this error don’t let you to compile and run your program coded on Visual C++. If you got this error you no need to reinstall Visual C++.

Causes:

  • this error appear because you have installed Visual C++ 2012 after you have actually installed Visual C++ 2010 in your system;
  • another cause is because .net Framework 4.5 replace .net Framework 4.0;
  • .net Framework corrupted files;

How to solve

  • uninstall .Net Framework 4.5 from your system;
  • then download .Net Framework 4.0 and install it;
  • this should fix your problem;

Other ways to solve it:

Go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe and check the version of cvtres.exe:

Wrong version:  03/18/2010  01:16 PM            31,048 cvtres.exe
Correct version: 02/21/2011  06:03 PM            31,056 cvtres.exe

If you have wrong version you should go to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and copy cvtres.exe then replace it with
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe

Conclusion:

Now you know how to solve LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt Visual C++ 2010 Error!

If you remove Visual C++ the error will not disappear;

Please let me know if it works property for you!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s