A summary of LNK2019 problems about unresolved external symbolic problems in C + +

Source: Internet
Author: User
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 + +

Related Article

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.