How to fix "FAILURE DURING CONVERSION TO COFF: FILE INVALID OR CORRUPT"

来源:互联网 发布:易分销 源码 编辑:程序博客网 时间:2024/05/21 17:25

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.
原创粉丝点击