Failure during conversion to COFF: file invalid or

2019-01-06 14:28发布

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++
8条回答
SAY GOODBYE
2楼-- · 2019-01-06 14:52

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.

查看更多
小情绪 Triste *
3楼-- · 2019-01-06 14:53

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

查看更多
贼婆χ
4楼-- · 2019-01-06 15:00

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)"
查看更多
男人必须洒脱
5楼-- · 2019-01-06 15:01

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

查看更多
时光不老,我们不散
6楼-- · 2019-01-06 15:02

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.

查看更多
倾城 Initia
7楼-- · 2019-01-06 15:09

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

查看更多
登录 后发表回答