c++ - QT and SQLITE problem during building -


I am developing a simple application to use sqlite, the problem is that the following code

< Pre> / * ... * / QSqlDatabase.db = QSqlDatabase :: addDatabase ("QSQLITE"); Db.setDatabaseName ("hellogoodbye"); If {QMessageBox :: key (0, qApp-> tr ( "Impossibile aprire Il database"), qApp-> tr ( "non-job stato possible aprire Il" "database"), QMessageBox (db.open ()!): : Cancel);}

me:

  C: \ Qt \ 2010.04 \ August to build desktop /../ August / main. CC: 17: `_imp___ZN12QSqlDatabase17defaultConnectionE the undefined reference 'C: \ Qt \ 2010.04 \ August manufacture desktop /../ August / main.cc: 17:` _imp___ZN12QSqlDatabase11addDatabaseERK7QStringS2_ undefined reference': \ Qt \ 2010.04 \ August create C Desktop /../ August / main.cc: 17: `_im P___ZN12QSqlDatabaseD1Ev is undefined reference 'C: \ QT \ 2010.04 \ August-creation desktop /../ August / main.cc: 18: `_imp___ZN12QSqlDatabase15setDatabaseNameERK7QString is undefined reference' C: \ QT \ 2010.04 \ August-creation desktop /../th August / main.cc: 19: \ Qt \ 2010.04 \ August manufacture desktop /../ August / main.cc: `_imp___ZN12QSqlDatabase4openEv 'C undefined reference: 27:` _imp___ZN1 undefined reference 2QSqlDatabaseD1Ev' C: \ Qt \ 2010.04 \ August-building desktops /../ August / main.cc: 27: `_imp___ZN12QSqlDatabaseD1Ev is undefined reference '  

I am using QTCreator. Can anyone help me?

Have you QT + sql added to the project file?


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -