PDA

View Full Version : SQLite



cyberboy
15th April 2008, 18:00
Hi everybody,

I'm currently busy developing a QT app. My developing studio is in mac with xcode and everything works fine. But the application has to run on a windows machine. (That's the reason why I'm using Qt). So I installed Qt on a virtual machine with windows XP. I ran the command line to install the debug libraries.

Everything went fine, the program compiled and after including some .dll files everything worked fine. But when I take the compiled project and try to run the program on a different computer it said: "The program need an SQLite driver", this is a custom error so this is the code that produces the error :

//check drivers
if (!QSqlDatabase::drivers().contains("QSQLITE"))
QMessageBox::critical(this, "Unable to load database", "This program needs a SQLite driver");

But when I search in the map there is a sqlite database. Only none of the queries in the program works.

What do I need to include to make it work? I included the .dll from www.sqlite.org but that works neither.

Greetz,

Cyberboy

wysota
15th April 2008, 19:46
copy plugins/sqldrivers/qsqlite.dll into sqldrivers directory on the target machine alongside the binary.

It should look like this
somepath\myapp.exe
somepath\sqldrivers\qsqlite.dll