VS 2010 - error LNK1123: failure during conversion to COFF: file invalid or corrupt


All replies

  • Hi Kaliber64,

    Welcome to the MSDN forum.

    I really have stuck in your issue some days ago, and here I give you some suggestions about it.

    1.        Try to re-install Visual Studio 2010 SP1, it will fix it.
    2.        If you do not want to do it, try this way:  (However, it will occur a warning when complier.) Set the Enable Incremental Linking to /No(/INCREMENTAL:NO) in property page->configuration properties->Linker->General.

    See more: ,

    My issue has gone now; I hope my suggestions will help you.



    Elegentin Xie [MSFT]
    MSDN Community Support | Feedback to us

    Monday, July 30, 2012 6:11 AM
  • Same problem as above with the exception that I am install vs express 2010 and cant get past building anything.


    I had downloaded vs 2012 express but wasnt successful cause i am using an old windows vista box (backup box). So i uninstalled 2012 express and installed vs 2010.

    Install was successful. Compilation fails at the end of building the library with the error:

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

    So far, I have uninstalled vs 2012 express, re-installed 2010 express and still the same error.

    Anyone have any ideas as to what to try next ??


    Thursday, February 28, 2013 1:13 AM
  • Have you tried SP1? You can create a new thread...

    Reply, then visible.

    Thursday, February 28, 2013 1:50 AM
  • Install was successful. Compilation fails at the end of building the library

    Are we to infer from this that you are trying to create a
    library rather than an exe? If so, what kind? DLL? Static?

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

    The typical cause is that you are passing a file to the linker
    which isn't a valid obj file, static library, or import lib.

    If you are passing arguments to link which are source code,
    or object code created with an older or non-compatible
    compiler, you will get this error. Note that object code
    files are rarely portable across compilers or even some
    versions of the same compiler.

    Without details of what you are trying to do, and how,
    there is little we can suggest. Note that it is not
    likely an installation problem with VC++, but probably
    an issue with what you have in the project you are

    - Wayne

    Thursday, February 28, 2013 4:55 AM
  • Thanks for taking the time for the answers !

    The problem is fixed now.

    Wayne: good explanation ... I checked and i didnt have any obj files from my other system. I usually do a clean and obj files are in a different directory. Good point though.

    fyi: I was building a static library. It seems like there were a couple of issues.

    I removed vs 2012 express because of incompatibility with vista, and re-installed vs 2010 express. The problem still persisted.

    I removed all sql server 2012. Using windows, this was a lot of packages/programs.

    I reinstalled sql server 2012. Installed sql server 2010 then reinstalled vs 2010 express, and voila ! next build worked.

    Seems like there is a certain dependency and incompatibility between the two sql server versions and vs 2010 express ??

    I think the problem could have been avoided if vs 2012 express wouldnt have installed on vista in the first place, rather than failing at the end and not removing all installed components.

    Thanks again for all the answers,


    Thursday, February 28, 2013 2:10 PM
  • Kaliber64,

       Found I had multiple versions of CVTRES.EXE on my system.

       VS2012 made my old 2010 cvtes.exe file obsolete in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin

       I renamed the file with V2010 in front and .old extension. The version in   C:\Windows\Microsoft.NET\Framework\v4.0.30319    from 9/19/2012 was left in place and that fixed the error.

        I hope this helps.

    • Proposed as answer by ralf-Mumpi Saturday, February 22, 2014 9:22 PM
    • Unproposed as answer by ralf-Mumpi Saturday, February 22, 2014 9:23 PM
    • Proposed as answer by ramacpr Wednesday, November 30, 2016 5:16 AM
    Tuesday, October 15, 2013 7:32 PM
  • VS 2012 installation has changed all content from "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" to its RTMRel version (10.0.30319.1) while VS 2010 SP1 (10.0.40219.1) was installed (including cvtres.exe mentioned above).

    I changed back its content and problem has gone.

    Wednesday, October 16, 2013 6:25 PM
  • Thank you! this worked well.
    Saturday, October 11, 2014 5:23 AM
  • This worked for me. Thanks a lot. 
    Wednesday, November 30, 2016 4:18 AM

    This was the quickest and easiest fix ever!

    Tuesday, October 03, 2017 10:15 AM