locked
fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '_IID_IXMLDOMImplementation'

    Question

  • Hi I am getting this single error when I am linking my project,

    1>COMMUNICATION.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '_IID_IXMLDOMImplementation'

    CAN ANYONE PLEASE TELL ME HOW TO FIX THIS??

    Tuesday, August 21, 2012 12:16 PM

All replies

  • Hi AmPatriX,
    This error happens when an object module contains two or more COMDATs with the same name.
    More information in MSDN: http://msdn.microsoft.com/en-us/library/cddbs9aw(v=vs.80).aspx 

    You can try to set “Enable Function-Level Linking” as No(/Gy-), it’s in Properties Pages->Configuration Properties->C/C++->Code Generation.

    Regards,

    Damon


    Damon Zheng [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 22, 2012 7:31 AM
    Moderator
  • Yes, I did it. But it doesn't works? Perhaps there is some another reason!!
    Wednesday, August 22, 2012 11:39 AM
  • Hi,

    I am updating a VC++ 6 Project in Microsoft Visual Studio 2005. After clearing up all the compiler errors, I have encountered a linker error 

    1>COMMUNICATION.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '_IID_IXMLDOMImplementation'.

    I read in the MSDN website, and hence forth took the following action

    “Enable Function-Level Linking” as No(/Gy-), it’s in the Properties Pages->Configuration Properties->C/C++->Code Generation.

    But even then it throws the same error. I am not able figure out what the exact problem is? I need urgent help as I need to submit my project within 1 week. So, I will be very much grateful to you if you could please tell me the possible causes and their respective corrections for the above mentioned error.


    Wednesday, August 22, 2012 8:49 PM
  • AmPatriX,

    You have raised this question in another thread: http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/57e3207e-9fab-4b83-b264-79a8a717a8a7

    I will merge this thread to that one. Please follow the former thread to get help.

    Thanks for understanding.

    Damon


    Damon Zheng [MSFT]
    MSDN Community Support | Feedback to us

    Friday, August 24, 2012 4:38 AM
    Moderator
  • This error can also be caused by using /H, Check it in Properties Pages->Configuration Properties->C/C++->Command Line, if you see /Hnumber in "Additional Options", delete it.

    Meanwhile, if you defined duplicate unnamed classes/structures in your program, this error may occur. See the following example:

    typedef struct _AA
    {
       struct
       {
          DWORD dwi;
       }BB;
      
       struct
       {
          DWORD dwj;
       }CC;
    }AA,*PAA;

    These codes may cause fatal error LNK1179, the way to fix it is to name them differently.

    typedef struct _AA
    {
       struct _BB
       {
          DWORD dwi;
       }BB;
      
       struct  _CC
       {
          DWORD dwj;
       }CC;
    }AA,*PAA;

    You can check your codes to see if there is similar situation.
    Hope my information can help.

    Regards,

    Damon


    Damon Zheng [MSFT]
    MSDN Community Support | Feedback to us

    Friday, August 24, 2012 6:40 AM
    Moderator
  • no i checked it, but there are no duplicate unnamed classes/structures in the program.....any other reason
    Friday, August 24, 2012 6:27 PM
  • AmPatriX,

    Sorry for my delayed reply.

    Since you have tried so many efforts but got no fix, the issue seems a little extraordinary.

    It will be helpful if you share your project with me. You can upload your project on Skydrive and provide me with the download link. You can remove any confidential information or business details from it. We just need a sample to reproduce the issue.

    Thanks,

    Damon


    Damon Zheng [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 30, 2012 7:27 AM
    Moderator