Qt app with static odbc plugin can only work in the developer machine.
-
I static built the Qt source codes with VS2010, the command is:
configure.exe -platform win32-msvc2010 -opensource -debug-and-release -static -fast -qt-sql-sqlite -plugin-sql-sqlite -qt-sql-odbc -plugin-sql-odbc -qt-zlib -no-qt3support -webkit -nomake docs -nomake demos -nomake examplesAnd i create an app which access the MS Access database. In My app's main.cpp, I add:
#include <QtPlugin>
Q_IMPORT_PLUGIN(qsqlodbc)In my app's project file, I add :
QTPLUGIN += qsqlodbcthen I build the app, it works. But when I copy the exe file and the *.mdb file to a customer PC, the app can execute, but fail to access the database, the error is :
QSqlError(-1056, "QODBC3: Unable to connect", "[Microsoft][ODBC Microsoft Access Driver] Could not find installable ISAM.")Is there anybody has met this before?
-
It works, I just deployed the app in the place without write permission.