链接器错误与wxTreeListCtrl

时间:2012-08-18 23:31:58

标签: c++ wxwidgets

使用wxWidgets开发应用程序,即使我的库也相当新,并且需要一些帮助修复这些链接器问题;

我首先尝试谷歌而没有运气。

1>mainwindow.obj : error LNK2001: unresolved external symbol "char const * const wxTreeListCtrlNameStr" (?wxTreeListCtrlNameStr@@3QBDB)
1>mainwindow.obj : error LNK2001: unresolved external symbol "protected: virtual class wxEventHashTable & __thiscall wxTreeListCtrl::GetEventHashTable(void)const " (?GetEventHashTable@wxTreeListCtrl@@MBEAAVwxEventHashTable@@XZ)
1>mainwindow.obj : error LNK2001: unresolved external symbol "protected: virtual struct wxEventTable const * __thiscall wxTreeListCtrl::GetEventTable(void)const " (?GetEventTable@wxTreeListCtrl@@MBEPBUwxEventTable@@XZ)
1>mainwindow.obj : error LNK2001: unresolved external symbol "private: int __thiscall wxTreeListCtrl::DoInsertColumn(class wxString const &,int,int,enum wxAlignment,int)" (?DoInsertColumn@wxTreeListCtrl@@AAEHABVwxString@@HHW4wxAlignment@@H@Z)
1>mainwindow.obj : error LNK2001: unresolved external symbol "private: virtual class wxWindowList __thiscall wxTreeListCtrl::GetCompositeWindowParts(void)const " (?GetCompositeWindowParts@wxTreeListCtrl@@EBE?AVwxWindowList@@XZ)
1>mainwindow.obj : error LNK2001: unresolved external symbol "private: void __thiscall wxTreeListCtrl::Init(void)" (?Init@wxTreeListCtrl@@AAEXXZ)
1>mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall wxTreeListCtrl::~wxTreeListCtrl(void)" (??1wxTreeListCtrl@@UAE@XZ)
1>mainwindow.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxTreeListCtrl::Create(class wxWindow *,int,class wxPoint const &,class wxSize const &,long,class wxString const &)" (?Create@wxTreeListCtrl@@QAE_NPAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z)

我试图将其格式化为代码,但在此网站上很难做到

1 个答案:

答案 0 :(得分:1)

您需要将高级库包含在链接到。

的wx库列表中

http://docs.wxwidgets.org/trunk/classwx_tree_list_ctrl.html

的wxTreeListCtrl文档中提到了这一点

每个wxwidgets类的文档都提到了在使用该类时需要链接哪个库。

enter image description here