VC find one or more multi-definition of the symbol, this problem is still not a good solution.
The fundamental thing is that all the relevant definitions are placed in the. cpp file, and only the declarations are placed in the corresponding. h file.
This allows you to completely avoid the phenomenon of symbolic redefinition when you include "".
In case this happens, try the following two ways to solve it:
1.vs2005, adding/force to the additional options in the command line, linker--------Properties
2. Adding a static label to a multi-defined symbol can be a good solution
Declare a global variable, the global function must be declared in the CPP, the other class refers to the global variable to include the CPP h file, and then an extern, otherwise it is easy to see the duplicate definition error.
How does this "easy" explain it?
For example A.h if the global variable int global is declared; In B.h, include "A.h" extern int Global;
Then you include A.h equivalent to the declaration of global variables in A.h also included, the compiler will be considered a duplicate definition. So global variables and function declarations must be in CPP!
1. When a function is implemented in the. h file, the VS2005 compiler reports this error, and the workaround: 1) Add inline before the function declaration in. h
2) Add/force in the additional options, command line, linker, properties----
2. When the function implementation is in a. cpp file, add the inline before the function implementation
VC finds one or more multi-defined symbols