Sqlite driver not loading
Trying to deploy an application on Windows but Sqlite driver is not loading.
After searching the forum, I have it set up as follows:
Executable and other files directory is C:\HRLogger_Release
Drivers qsqlite4.dll and sqlite3.dll are in C:\HRLogger_Release\sqldrivers
Using this code:
Code:
applPath.append("/sqldrivers");
qApp->addLibraryPath(applPath);
qDebug() << "applPath is now " << applPath;
Produces this:
applPath is now "C:/HRLogger_Release/sqldrivers"
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:
What am I missing here?
Re: Sqlite driver not loading
as far as I remember sqlite3.dll has to be in the root directory. Alternatively you can build Qt with on-board-sqlite. Then you wont face such kind of problems.
Re: Sqlite driver not loading
Thanks Lykurg but copying sqlite3.dll to the application root directory had no effect.
I should have explained that the application executable and associated files are being generated on a Windows machine with a default Qt installation that included sqlite. Then the release directory is copied over to the target Windows machine which does not have Qt installed.
The application runs fine on the development machine - from either debug or release build.
Any other ideas?
Re: Sqlite driver not loading
Hm which version of Qt are you using? Because 4.6.2 had build in support for sqlite. From where do you get the Qt dll's? make sure you have take them from C:\Qt\2010.02.1\qt\bin.
Re: Sqlite driver not loading
Thanks Lykurg! Upgraded to 4.6.2 and deployed successfully! I can't believe how fast this database application runs on an old Lenovo notebook.
Qt rocks.