error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall 的解决方案
2012-09-12 11:45
513 查看
有时候我们采用dll或者lib编程的时候,会发现这个连接错误,无法被解析。
原因是我们没有加载lib库文件。
以abc动态连接为例
在工程中包含dll的.h头文件。
#include "abc.h"
将abc.dll放于工程目录下。
我们在工程》设置》连接》加入abc.lib库文件
第二种方法
在工程中包含dll的.h头文件,动态连接lib文件
#include "abc.h"
#pragram comment(lib, "abc.lib")
将abc.dll放于工程目录下。
以上两种都可以。
原因是我们没有加载lib库文件。
以abc动态连接为例
在工程中包含dll的.h头文件。
#include "abc.h"
将abc.dll放于工程目录下。
我们在工程》设置》连接》加入abc.lib库文件
第二种方法
在工程中包含dll的.h头文件,动态连接lib文件
#include "abc.h"
#pragram comment(lib, "abc.lib")
将abc.dll放于工程目录下。
以上两种都可以。
相关文章推荐
- error LNK2019: unresolved external symbol "__declspec(dllimport) void 遇到的问题以及解决办法
- LINK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string的解决方案
- xx.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) 错误
- error LNK2019: unresolved external symbol "public: __thiscall
- error LNK2019: unresolved external symbol "__declspec(dllimport) const CReadUserInfo::`vftable'" (__
- error LNK2019: unresolved external symbol "public 错误的出现原因.
- widget.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl
- C++ 遇到error LNK2019: unresolved external symbol "public: void __thisca的问题
- debug : error LNK2019: unresolved external symbol compress referenced in function "public: int __cde
- Qt中编译出现mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall MyWidget::M
- error LNK2019: unresolved external symbol "public:
- Qt 编译时出现“-1: error: LNK2019: unresolved external symbol "public: void __thiscall M”错误
- 1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall Chain<int>::~Chain<int>
- error LNK2019: unresolved external symbol "public: class CVD::ImageRef __thiscall VideoSou
- MFC DLL报错:error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall
- Qt datepasssave.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall。
- 关于error LNK2001: unresolved external symbol "__declspec(dllimport) public
- error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::Co.....
- error LNK2019:unresolved external symbol *** referenced in function ***的解决方案
- Error LNK2019:Unresolved External Symbol 的解决方案