miondere
30-03-2004, 17:12
Qualcuno di voi usa le wxWindows?
Devo realizzare un piccolo programma che attraverso le wx mi permetta di accedere ad un database tramite odbc (usando visual studio 6.0).
Ho incluso le wx.h come vedete sotto.
//------------------------
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h
#include <wx/wx.h>
#endif
#include <wx/db.h>
//----------------------
Poi devo stabilire la connessione con il database (ne ho creato uno in access di nome "db1") e ho creato un dsn utente di nome "database1" che fa riferimento al database creato.
Per stabilire la connessione scrivo il seguente codice:
//---------------
int main()
{
wxDbConnectInf DbConnectInf;
DbConnectInf.SetDsn("database1");
DbConnectInf.SetUserID("tommi");
DbConnectInf.SetPassword("tommi");
DbConnectInf.SetDefaultDir("d:/Università/mi distribuiti/db1.mdb");
return 0;
}
//--------------
In fase di linking mi da i seguenti errori, sapete come risolverli? Sbaglio in qualche punto? Devo inserire qualche libreria particolare? :( Grazie e ciao!
data.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::~wxDbConnectInf(void)" (??1wxDbConnectInf@@QAE@XZ)
data.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetPassword(class wxString const &)" (?SetPassword@wxDbConnectInf@@QAEXABVwxString@@@Z)
data.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetUserID(class wxString const &)" (?SetUserID@wxDbConnectInf@@QAEXABVwxString@@@Z)
data.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetDsn(class wxString const &)" (?SetDsn@wxDbConnectInf@@QAEXABVwxString@@@Z)
data.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::wxDbConnectInf(void)" (??0wxDbConnectInf@@QAE@XZ)
data.obj : error LNK2001: unresolved external symbol "public: class wxString & __thiscall wxString::operator=(class wxString const &)" (??4wxString@@QAEAAV0@ABV0@@Z)
data.obj : error LNK2001: unresolved external symbol "private: void __thiscall wxString::InitWith(char const *,unsigned int,unsigned int)" (?InitWith@wxString@@AAEXPBDII@Z)
Debug/data.exe : fatal error LNK1120: 7 unresolved externals
Qualcuno di voi usa le wxWindows? :muro:
Devo realizzare un piccolo programma che attraverso le wx mi permetta di accedere ad un database tramite odbc (usando visual studio 6.0).
Ho incluso le wx.h come vedete sotto.
//------------------------
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h
#include <wx/wx.h>
#endif
#include <wx/db.h>
//----------------------
Poi devo stabilire la connessione con il database (ne ho creato uno in access di nome "db1") e ho creato un dsn utente di nome "database1" che fa riferimento al database creato.
Per stabilire la connessione scrivo il seguente codice:
//---------------
int main()
{
wxDbConnectInf DbConnectInf;
DbConnectInf.SetDsn("database1");
DbConnectInf.SetUserID("tommi");
DbConnectInf.SetPassword("tommi");
DbConnectInf.SetDefaultDir("d:/Università/mi distribuiti/db1.mdb");
return 0;
}
//--------------
In fase di linking mi da i seguenti errori, sapete come risolverli? Sbaglio in qualche punto? Devo inserire qualche libreria particolare? :( Grazie e ciao!
data.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::~wxDbConnectInf(void)" (??1wxDbConnectInf@@QAE@XZ)
data.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetPassword(class wxString const &)" (?SetPassword@wxDbConnectInf@@QAEXABVwxString@@@Z)
data.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetUserID(class wxString const &)" (?SetUserID@wxDbConnectInf@@QAEXABVwxString@@@Z)
data.obj : error LNK2001: unresolved external symbol "public: void __thiscall wxDbConnectInf::SetDsn(class wxString const &)" (?SetDsn@wxDbConnectInf@@QAEXABVwxString@@@Z)
data.obj : error LNK2001: unresolved external symbol "public: __thiscall wxDbConnectInf::wxDbConnectInf(void)" (??0wxDbConnectInf@@QAE@XZ)
data.obj : error LNK2001: unresolved external symbol "public: class wxString & __thiscall wxString::operator=(class wxString const &)" (??4wxString@@QAEAAV0@ABV0@@Z)
data.obj : error LNK2001: unresolved external symbol "private: void __thiscall wxString::InitWith(char const *,unsigned int,unsigned int)" (?InitWith@wxString@@AAEXPBDII@Z)
Debug/data.exe : fatal error LNK1120: 7 unresolved externals
Qualcuno di voi usa le wxWindows? :muro: