Problem with loading SQL Drivers
-
I build app in Mac OS X with PostgreSQL, so I used QPSQL driver.
But when I build app for Windows I use MSSQL and QODBC driver.
In the Settings window (https://github.com/wid0ki/Berlitz/blob/master/settings.cpp) user can set some attributes for connection. On Mac I can connect to db, and do everything that I need.
But when we build app for Win, we see:
QSqlDatabase: driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
Something wrong with db openning hey!
QSqlError(-1, "Driver not loaded", "Driver not loaded")Also we write: QApplication::addLibraryPath("C:\Qt\5.1.1\Src\qtbase\src\plugins");
but it doesn't help. -
Hi,
Do you have the plugin dll dependencies in your PATH ?
-
AFAIK it should be, but you would also need to link to the static version of your dependencies (e.g. you sql plugins)
The plugins can be static but linked to the dynamic library of e.g. mysql.
Also, don't forget the licensing implication of a static build