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.