一个link 2019的错误,一直没有解决思路,最后解决掉,把思路记录下
error msg:
UpDlgView.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CMarkup::~CMarkup(void)" (
__imp_??1CMarkup@@QAE@XZ) referenced in function "public: void __thiscall CUpDlgView::OnButtonadd(void)" (
?OnButtonadd@CUpDlgView@@QAEXXZ)
UpDlgView.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall CMarkup::AddElem(char const *,char const *,int)" (
__imp_?AddElem@CMarkup@@QAE_NPBD0H@Z) referenced in function "public: void __thiscall CUpDlgView::OnButtonadd(void)" (
?OnButtonadd@CUpDlgView@@QAEXXZ)
UpDlgView.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CMarkup::CMarkup(void)" (
__imp_??0CMarkup@@QAE@XZ) referenced in function "public: void __thiscall CUpDlgView::OnButtonadd(void)" (
?OnButtonadd@CUpDlgView@@QAEXXZ)
分析:
错误的类别是:unresolved external symbol ,是一个没有解决的外部变量,因为一直认为第三方类不可能有错误所以一直在自己编写的代码中寻找错误,其实错误的关键在这里:"__declspec(dllimport)" 这说明这是一个外部导出类,所以需要 将class AFX_EXT_CLASS CMarkup 改为 class CMarkUp .
posted on 2007-01-30 10:37
乔栋 阅读(599)
评论(0) 编辑 收藏 引用 所属分类:
C++的健身房