On the internet generally have a very comprehensive solution, and recently happened to this long also encountered this problem, also happened to solve, this problem should be counted as a configuration problem, rather than the program itself, most of them because of the unfamiliar program caused, this problem seems very simple, but Wood has experience is difficult to quickly find a solution, So it's more anxious to do a record here. This exception occurs during the link phase, where the source code is linked to Lib or DLL, mainly because of the following two reasons: 1. The header file has a function declaration, and the CPP file does not write the implementation. (The probability of such a situation is very small, which third-party library development This would be so careless?) 2. Is the problem that the long encountered: forget to add the appropriate Lib in the project-"Properties-" Configuration Properties-linker-"input-" additional dependencies. Here to focus on how to determine the external symbol can not find the. h file belongs to which Lib library problem, my practice is: Look at this header file is the directory under include, usually, this directory is the file name of Lib, not sure, you can use everything to the directory name. lib Search to check 。 In addition, when the project is configured, we often see a string such as $ (solutiondir) include, in fact $ (SOLUTIONDIR) is the directory where *.sln is located, is the VS custom macro.
A summary of LNK2019 problems about unresolved external symbolic problems in C + +