Several cases of unresolved external symbols in C + +

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/enotswn/article/details/5934938

[0] The occurrence of unresolved may be because the Lib file is incorrect, such as a 64-bit compilation configuration, the result is using a 32-bit LIB package.
[1] Only class declarations have been written, but no implementation classes have been written, resulting in a call that cannot be resolved
[2] declarations and definitions are not unified, resulting in inconsistent links, can not be resolved
[3] There is no command-line option to add the corresponding class package in the Project property page of the linker.
[4] No corresponding package path is added to the C + + include directory and library directory
[5] In the test project the file directory may need to contain the tested class of CPP definition file
[6] Ice interface test, can not be resolved because the test file is not included in the relevant CPP file, in addition, in the Testsuite_projectrun.h file needs to include the IProjectRun.h header file, and related header files (for example).

[7]import related unresolved content, the workaround is to include the corresponding dynamic library in the linker's dependencies

[8] The following error is usually caused by a dynamic library does not have a package come in. __imp
ProjectRun.obj:error LNK2019: unresolved external symbol __imp__starthistorylocalmodule, the symbol in function "Protected:virtual int __thiscall Hirtdb::cprojectrun::D ostart (void) "([email protected]@[email protected]@MAEHXZ) is referenced

[9]error LNK2001: unresolved external symbol __IMP___CRTDBGREPORTW
Project Properties, c/C + +, code generation, run-time library select MDD,

[9] unresolved external symbol "__declspec (dllimport) public:int __thiscall hirtdb::ctagtree::getobjecta (int,struct hirtdb:: Sbasereadprops const &,struct Hirtdb::sbasereadvalues &) "([email protected]@[email protected]@[email protected]@[email protected]@@z), the symbol in the function "Public:int __thiscall hirtdb::cstringimpl::get (int,struct hirtdb::sstringreadprops const &,STRUCT Hirtdb::sstringreadvalues &) "([email protected]@[email protected]@[email protected]@[email protected]@@z) is referenced in

The reason may be that there are extra options in the project configuration file, refer to the configuration options for other modules, and do not have redundant configuration.

Several cases of unresolved external symbols in C + +

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.