天天看點

error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: __thiscall DuiLib::WindowImplBase::WindowImp

轉自VC錯誤:http://www.vcerror.com/?p=2078

問題描述:

在做duilib開發的時候,編譯一個示例工程,出現如下錯誤:

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: __thiscall DuiLib::WindowImplBase::WindowImplBase(void)" ([email protected]@@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual __thiscall DuiLib::WindowImplBase::~WindowImplBase(void)" ([email protected]@@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual void __thiscall DuiLib::WindowImplBase::OnFinalMessage(struct HWND__ *)" ([email protected]@[email protected]@[email protected]@@Z)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: __thiscall DuiLib::CDuiString::CDuiString(char const *,int)" ([email protected]@@[email protected]@Z)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: __thiscall DuiLib::CDuiString::~CDuiString(void)" ([email protected]@@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: class DuiLib::CControlUI * __thiscall DuiLib::CPaintManagerUI::FindControl(char const *)const " ([email protected]@[email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: void __thiscall DuiLib::CWebBrowserUI::SetHomePage(char const *)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: bool __thiscall DuiLib::CDuiString::operator==(char const *)const " ([email protected]@@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) protected: virtual char const * __thiscall DuiLib::CWindowWnd::GetSuperClassName(void)const " ([email protected]@[email protected]@MBEPBDXZ)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual unsigned int __thiscall DuiLib::WindowImplBase::GetClassStyle(void)const " ([email protected]@[email protected]@UBEIXZ)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::HandleMessage(unsigned int,unsigned int,long)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) protected: virtual void __thiscall DuiLib::WindowImplBase::OnClick(struct DuiLib::tagTNotifyUI &)" ([email protected]@[email protected]@[email protected]@@Z)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual char const * __thiscall DuiLib::WindowImplBase::GetResourceID(void)const " ([email protected]@[email protected]@UBEPBDXZ)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnClose(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnDestroy(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnNcActivate(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnNcCalcSize(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnNcPaint(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnNcHitTest(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnGetMinMaxInfo(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnMouseWheel(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnMouseHover(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnSize(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnChar(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnSysCommand(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnCreate(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnKeyDown(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnKillFocus(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnSetFocus(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnLButtonDown(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnLButtonUp(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::OnMouseMove(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::HandleCustomMessage(unsigned int,unsigned int,long,int &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::GetStyle(void)" ([email protected]@[email protected]@UAEJXZ)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) protected: virtual struct DuiLib::DUI_MSGMAP const * __thiscall DuiLib::WindowImplBase::GetMessageMap(void)const " ([email protected]@[email protected]@[email protected]@XZ)

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual long __thiscall DuiLib::WindowImplBase::MessageHandler(unsigned int,unsigned int,long,bool &)" ([email protected]@[email protected]@[email protected])

1>DuiWebWnd.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: virtual class DuiLib::CControlUI * __thiscall DuiLib::WindowImplBase::CreateControl(char const *)" ([email protected]@[email protected]@[email protected]@[email protected])

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: static void __cdecl DuiLib::CPaintManagerUI::SetInstance(struct HINSTANCE__ *)" ([email protected]@[email protected]@[email protected]@@Z)

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: static void __cdecl DuiLib::CPaintManagerUI::SetResourcePath(char const *)" ([email protected]@[email protected]@[email protected])

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: __thiscall DuiLib::CDuiString::operator char const *(void)const " ([email protected]@@QBEPBDXZ)

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: static class DuiLib::CDuiString __cdecl DuiLib::CPaintManagerUI::GetInstancePath(void)" ([email protected]@[email protected]@[email protected]@XZ)

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: struct HWND__ * __thiscall DuiLib::CWindowWnd::Create(struct HWND__ *,char const *,unsigned long,unsigned long,int,int,int,int,struct HMENU__ *)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@@Z)

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: void __thiscall DuiLib::CWindowWnd::CenterWindow(void)" ([email protected]@[email protected]@QAEXXZ)

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: void __thiscall DuiLib::CWindowWnd::ShowWindow(bool,bool)" ([email protected]@[email protected]@[email protected])

1>testWebUI.obj : error LNK2001: 無法解析的外部符号 "__declspec(dllimport) public: static void __cdecl DuiLib::CPaintManagerUI::MessageLoop(void)" ([email protected]@[email protected]@SAXXZ)

解決方法:

具體的解決方法參考文章:http://www.vcerror.com/?p=2078

繼續閱讀