For some reason I'm getting linker errors when I try to add sqlite db to my qt project.

qt_sqlite_linker_error.jpg

Qt Code:
  1. #include <QApplication>
  2. #include <QtSql/QSqlDatabase>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7.  
  8. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  9. db.setDatabaseName("C:/path/to/my/sqlite/file/file.sqlite");
  10. db.open();
  11. db.close();
  12. MainWindow w;
  13. w.show();
  14. return a.exec();
  15. }
To copy to clipboard, switch view to plain text mode 

I also have

Qt Code:
  1. QT += sql
To copy to clipboard, switch view to plain text mode 

in my .pro file.

Any suggestions?