Page 1 of 1

wxwidgets用vc6.0编译的问题

Posted: Wed May 19, 2010 3:13 pm
by wubi
我用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)

Posted: Thu May 20, 2010 9:39 am
by kingkamg
把wx所有的库都包含一遍不就知道是不是缺库了

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

Posted: Thu May 20, 2010 10:21 am
by sishui
编译wx库的时候,wxUSE_ODBC是否设置成1?

Posted: Thu May 27, 2010 11:31 am
by wubi
谢谢,我已经解决了。是wxUse_ODBC没有设为1