Yesterday, I encountered an error in Microsoft Visual Studio 2010, when I in a discussion with a friend tried to run the C code example of “hello world” written in my first post on this blog. Visual Studio reported, Error LNK1123: failure during conversion to COFF: file invalid or corrupt. Hmm, what happened just?
Well, visiting Linker Tools Error LNK1123 at MSDN didn’t provide me with a direct solution to my problem. I went back to the project properties, and found out that in the General settings under the Linkersettings, the Enable Incremental Linking was set to Yes (/INCREMENTAL).
Enable Incremental Linking simply means that the linker links your *.exe or *.DLL in a smarter way which makes it easier for the linker to update the existing *.exe or *.DLL when you make a small change in the code, and recompile it.
However, to fix this problem simply change the Enable Incremental Linking to No (/INCREMENTAL:NO) and click OK.
I hope this information solved your C/C++ linker issues in Microsoft Visual Studio.