LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

LINK : fatal error LNK1123: fail­ure dur­ing con­ver­sion to COFF: file invalid or cor­rupt

It’s a com­mon error when you com­pile C++-projects with Visu­al Stu­dio 2010. Ift hap­pens when 2 ver­sion of Visu­al Stu­dio are installed on same PC (like 2010 and 2012) and cause con­flict between two ver­sions of cvtres.exe.

To fix it, go to the bin direc­to­ry of Visu­al Stu­dio 2010 (c:Program Files (x86)Microsoft Visu­al Stu­dio 10.0VCbin or some­thing like this) and rename cvtres.exe to cvtres0.exe.
Don’t wor­ry, it willn’t break link­er of 2010.