For some reason I'm getting linker errors when I try to add sqlite db to my qt project.
Attachment 9170
Code:
#include <QApplication> #include <QtSql/QSqlDatabase> int main(int argc, char *argv[]) { db.setDatabaseName("C:/path/to/my/sqlite/file/file.sqlite"); db.open(); db.close(); MainWindow w; w.show(); return a.exec(); }
I also have
Code:
QT += sql
in my .pro file.
Any suggestions?