☆Smoozer☆

::Easy Life.
Super weird problem to deploy QT application (from version 4.4.3 to 4.5.2)
I once wrote a small application with QT 4.4.3, using sqlite3 for database. And I deployed it on a non-QT environment machine, it worked fine. (I used QCoreApplication::addLibraryPath() to load plugins, especially for plugins\sqldrivers\qsqlite4.dll. )

Recently, I updated my QT to 4.5.2. And did a few changes to that application. For deployment, I also updated all dlls to 4.5.2, no big deal... And I tested on that machine (supposing it's machineA), good enough. But when I installed it to my another laptop(supposing it's machineB) and ran it, a strange thing happened:
Error dialog "Driver not loaded" popped up!

I used logs to track this, when I called QSqlDatabase::addDatabase("QSQLITE"); and then listed out all drivers, on machineA: there is QSQLITE, but on machineB, nothing.

I don't know what happened. I added QSQLITE but failed? WHY?

Here are my hard story for debugging:
1. double-check enviroment all set for QT4.5.2.
2. double-check all dlls for deployment are 4.5.2.
3. re-create the project from scrach, using pro file.

But every time, the same result. No other ways, I compared every files for deployment, hoping to find something useful. All differences are the executable application file, and all dlls. I began to downgrade every dll to 4.4.3... Thing changed until I did for all of them.

I have no idea til now. Anybody knows about this?


posted on 2009-10-30 18:55  smoozer  阅读(258)  评论(0编辑  收藏  举报