Fatal error lnk1169: one or more multiply defined symbols found Solution

Source: Internet
Author: User

1. linker tools error lnk1169

One or more multiply defined symbols found

The build failed due to multiple definitions of one or more symbols. This error is preceded by error lnk2005.

The/force or/Force: Multiple option overrides this error.

That is, "Add/Force: Multiple to project options: In Project/setting/link/General"

2. linker tools error lnk2005

Symbol already defined in object

The givenSymbol, Displayed in its decorated form, was multiply defined.

Tips

One of the following may be a cause:

  • The most common cause of this error is accidentally linking with both the single-threaded and multithreaded libraries. ensure that the application project file has des only the appropriate libraries and that any third-party libraries have appropriately created single-threaded or multithreaded versions. // go to "Project Properties"-> "C/C ++"-> "code generation"-> "Run-Time Library) set the application to multi-thread or single-Thread
  • The givenSymbolWas a packaged function (created by compiling with/Gy) and was stored in more than one file but was changed between compilations. recompile all files that includeSymbol. // The C language provides a mechanism to Package Multiple Target files into one file. This is the static library ). The Library brings convenience to developers, but it is also the root cause of some chaos...
  • The givenSymbolWas defined differently in two Member objects in different libraries, and both Member objects were used. // different libraries have different definitions for the same global object.
  • An absolute was defined twice, with a different value in each definition. //. // different libraries have different values for the same global object.

This error is followed by fatal error lnk1169.

The reason for these errors is provided.

For example, when clapack is configured in vs2010, an error occurs during compilation. After reading the documents, we find that the clapack library is added to the required project.It should be the same as the method we selected when compiling the clapack library file (Http://www.docin.com/p-105319970.html),If Mt/D is selected, this error is not displayed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.