Link1169 appears, usually one or more functions are found in the compiled obj file, so that the link does not know which function to choose
- Code Situation:
File A:
file B:#include <iostream> #define cs int cs Mutiply(int a,int b) { cs result = a * b; return result; #include "flag.h" void Log(const char* message) { std::cout << message << std::endl; }
file C:#include <iostream> void Log(const char* message) { std::cout << message << std::endl; }
In the case of the above code, file B and file A have exactly the same Log() function, so when looking for links, I don’t know which one to choose.#include <iostream> void Log(const char* message); int main() { Log("Hello world!"); std::cin.get(); }
- Solution: Delete the Log() function in file B or file A