wxwidgets用vc6.0编译的问题 Topic is solved

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
wubi
In need of some credit
In need of some credit
Posts: 8
Joined: Wed May 12, 2010 12:26 pm

wxwidgets用vc6.0编译的问题

Post by wubi » Wed May 19, 2010 3:13 pm

我用wxwidgets写了一个小程序的,用到数据库。我是用ODBC连接的。
我在工程中添加了wxbase28d_odbc.lib。什么原因。是不是还缺少什么lib?
编译结果如下:
--------------------Configuration: wx_dll_test - Win32 Debug--------------------
Linking...
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDbTable::Open(bool,bool)" ([email protected]@@[email protected])
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDbTable::SetColDefs(unsigned short,class wxString const &,int,void *,short,int,bool,bool,bool,bool)" ([email protected]@@[email protected]@[email protected])
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbTable::wxDbTable(class wxDb *,class wxString const &,unsigned short,class wxString const &,bool,class wxString const &)" ([email protected]@[email protected]@@[email protected]@[email protected])
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDb::CommitTrans(void)" ([email protected]@@QAE_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: int __thiscall wxDbTable::Insert(void)" ([email protected]@@QAEHXZ)
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDbTable::DeleteWhere(class wxString const &)" ([email protected]@@[email protected]@@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::~wxDbConnectInf(void)" ([email protected]@[email protected])
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDb::Open(class wxDbConnectInf *,bool)" ([email protected]@@[email protected]@[email protected])
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDb::wxDb(void * const &,bool)" ([email protected]@[email protected][email protected])
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDbConnectInf::AllocHenv(void)" ([email protected]@@QAE_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetConnectionStr(class wxString const &)" ([email protected]@@[email protected]@@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::wxDbConnectInf(void)" ([email protected]@[email protected])
main.obj : error LNK2001: unresolved external symbol "private: bool __thiscall wxDbTable::getRec(unsigned short)" ([email protected]@@[email protected])
Debug/wx_dll_test.exe : fatal error LNK1120: 13 unresolved externals
执行 link.exe 时出错.

wx_dll_test.exe - 1 error(s), 0 warning(s)

kingkamg
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Tue Apr 08, 2008 1:45 pm

Post by kingkamg » Thu May 20, 2010 9:39 am

把wx所有的库都包含一遍不就知道是不是缺库了

sishui
Earned some good credits
Earned some good credits
Posts: 121
Joined: Mon Mar 10, 2008 6:13 am
Location: 中國

Re: wxwidgets用vc6.0编译的问题

Post by sishui » Thu May 20, 2010 10:21 am

编译wx库的时候,wxUSE_ODBC是否设置成1?
work work!!!

wubi
In need of some credit
In need of some credit
Posts: 8
Joined: Wed May 12, 2010 12:26 pm

Post by wubi » Thu May 27, 2010 11:31 am

谢谢,我已经解决了。是wxUse_ODBC没有设为1

Post Reply