Hi, I'm developing a simple application to use sqlite, the problem is that the following code
/*
...
*/
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName("hellogoodbye");
if (!db.open()) {
QMessageBox::critical(0, qApp->tr("Impossibile aprire il database"),
qApp->tr("Non è stato possibile aprire il"
"database"), QMessageBox::Cancel);}
give me:
C:\Qt\2010.04\August-build-desktop/../August/main.cc:17: undefined reference to `_imp___ZN12QSqlDatabase17defaultConnectionE'
C:\Qt\2010.04\August-build-desktop/../August/main.cc:17: undefined reference to `_imp___ZN12QSqlDatabase11addDatabaseERK7QStringS2_'
C:\Qt\2010.04\August-build-desktop/../August/main.cc:17: undefined reference to `_imp___ZN12QSqlDatabaseD1Ev'
C:\Qt\2010.04\August-build-desktop/../August/main.cc:18: undefined reference to `_imp___ZN12QSqlDatabase15setDatabaseNameERK7QString'
C:\Qt\2010.04\August-build-desktop/../August/main.cc:19: undefined reference to `_imp___ZN12QSqlDatabase4openEv'
C:\Qt\2010.04\August-build-desktop/../August/main.cc:27: undefined reference to `_imp___ZN12QSqlDatabaseD1Ev'
C:\Qt\2010.04\August-build-desktop/../August/main.cc:27: undefined reference to `_imp___ZN12QSqlDatabaseD1Ev'
I'm using QTCreator. Anyone can help me?