locked
HOW TO FIX IT? SOS! fatal error LNK1169: one or more multiply defined symbols found RRS feed

  • Question

  • fatal error LNK1169: one or more multiply defined symbols found

    How can i fix this error?

    Monday, December 9, 2019 7:45 PM

All replies

  • Hi ULARbro,

    Welcome to MSDN forum.

    >> Fatal error LNK1169

    ## This error is preceded by error LNK2005. Generally, this error means you have broken the one definition rule, which allows only one definition for any used template, function, type, or object in a given object file, and only one definition across the entire executable for externally visible objects or functions.

    Do you meet this error when you are running test project? And does your project build/debug well without any error?

    According to the official document,  You could refer to below possible causes and for solutions please refer to this link Possible causes and solutions.

    (1) Check if one of your header file defines a variable and maybe include this header file in more than one source file in your project.

    (2) This error can occur when a header file defines a function that isn’t inline. If you include this header file in more than one source file, you get multiple definitions of the function in the executable.

    (3) This error can also occur if you define member functions outside the class declaration in a header file.

    (4) This error can occur if you link more than one version of the standard library or CRT.

    (5) This error can occur if you mix use of static and dynamic libraries when you use the /clr option

    (6) This error can occur if the symbol is a packaged function (created by compiling with /Gy) and it was included in more than one file, but was changed between compilations. 

    (7) This error can occur if the symbol is defined differently in two member objects in different libraries, and both member objects are used. One way to fix this issue when the libraries are statically linked is to use the member object from only one library, and include that library first on the linker command line. 

    (8) This error can occur if an extern const variable is defined twice, and has a different value in each definition. 

    (9) This error can occur if you use uuid.lib in combination with other .lib files that define GUIDs (for example, oledb.lib and adsiid.lib).

    There are some similar issues and maybe helpful.

    LNK1169 and LNK2005 Errors.

    Fatal error LNK1169: one or more multiply defined symbols found in game programming.

    Fatal error LNK1169: one or more multiply defined symbols found.

    Hope all above could help you.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 10, 2019 2:50 AM
  • Hi ULARbro,

    Sorry to bother you.

    Did tianyu's suggestion work for you? If possible, could you please share a simple sample using github or OneNote, which could help us reproduce this issue and analysis it better?

    Looking forward to your feedback.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, December 11, 2019 9:43 AM
  • Hi ULARbro,

    Do you have any update?

    Please feel free to let us know if your issue has been solved or not.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 3, 2020 9:21 AM