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 »

我用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)" (?Open@wxDbTable@@QAE_N_N0@Z)
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)" (?SetColDefs@wxDbTable@@QAE_NGABVwxString@@HPAXFH_N222@Z)
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 &)" (??0wxDbTable@@QAE@PAVwxDb@@ABVwxString@@G1_N1@Z)
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDb::CommitTrans(void)" (?CommitTrans@wxDb@@QAE_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: int __thiscall wxDbTable::Insert(void)" (?Insert@wxDbTable@@QAEHXZ)
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDbTable::DeleteWhere(class wxString const &)" (?DeleteWhere@wxDbTable@@QAE_NABVwxString@@@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::~wxDbConnectInf(void)" (??1wxDbConnectInf@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDb::Open(class wxDbConnectInf *,bool)" (?Open@wxDb@@QAE_NPAVwxDbConnectInf@@_N@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDb::wxDb(void * const &,bool)" (??0wxDb@@QAE@ABQAX_N@Z)
main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall wxDbConnectInf::AllocHenv(void)" (?AllocHenv@wxDbConnectInf@@QAE_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetConnectionStr(class wxString const &)" (?SetConnectionStr@wxDbConnectInf@@QAEXABVwxString@@@Z)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::wxDbConnectInf(void)" (??0wxDbConnectInf@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "private: bool __thiscall wxDbTable::getRec(unsigned short)" (?getRec@wxDbTable@@AAE_NG@Z)
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 »

把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 »

编译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 »

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