VS2010 Package DLL times wrong: Error LNK2019: unresolved external symbols "__declspec (dllimport) _visual

Source: Internet
Author: User

VS2010 Package DLL times wrong:

Error LNK2019: unresolved external symbol "__declspec (dllimport) const ctriplinedetection:: ' vftable '" (__imp_?? _7ctriplinedetection@@6b@), the symbol is in the function "public: __thiscall ctriplinedetection::ctriplinedetection (void)" (?? 0ctriplinedetection@ @QAE @xz) is referenced 1>m:\test\svnnew4.2\allneeds\triplinedetection.dll:fatal error lnk1120:1 An unresolved external command


Online search solutions, some netizens suggest:

An engineering build DLL file is executed for another project, but error LNK2019: an unresolved external symbol "__declspec (dllimport) error occurs at each execution. Check the code several times and feel that there is no problem.

Finally, the character set was found to be problematic. The character set of the build DLL file is Unicode and the character set for the EXE file is the default ASCII.

The problem can be resolved as long as the unified character set:

The VS2005 C + + Project default character set is the use of the Unicode character set, which sets the character set in the project properties-> Configuration Properties--> The General-> project default-> character set.

The supplemental VC6.0 is by default in the ASCII character set.


But I found that the default character set in engineering is the use of the Unicode character set, this method can not solve the problem, the program will still complain

The solution is:

Suppose the newly defined DLL name is Newfuncdll

Property-> Configuration properties are added->c/c++-> preprocessor-> preprocessor definitions; Newfuncdll problem can be solved

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.