[Qt-interest] Qt 4.5.1, MSVC2005, WinXP: Problem loading qsqlite plugin dynamically ondeploymentcomputer
Jeffrey Brendecke
jwbrendecke at icanetix.com
Tue Jul 14 15:19:22 CEST 2009
Thanks to everyone for the input. I am saving for later should I decide to
load db driver plugins dynamically again.
I made the problem go away by recompiling Qt with this option:
-qt-sql-sqlite
... and then in the .pro:
#QTPLUGIN += qsqlite
Then, it just worked on the deployment computer after a simple file-copy
installation.
No qt.conf is needed and no plugins directory.
I am supposing that the driver is compiled into QtSqld4.dll. There is no need
to link to any special libraries with this approach.
-------------
On Monday 13 July 2009 23:48:07 Bill King wrote:
> ext Jeffrey Brendecke wrote:
> > Thanks for the suggestion!
> >
> > I am in the process of recompiling qt to not load the qsqlite driver as a
> > plugin. If I still have problems I will give what you suggest a try.
> >
> > I have seen through some searches on the Internet a number of cases of
> > develpers having issues loading db drivers as plugins at runtime, and not
> > many examples of the problems having been resolved.
> >
> > -----------
> >
> > On Monday 13 July 2009 20:08:52 David Ching wrote:
> >> "Jeffrey Brendecke" <jwbrendecke at icanetix.com> wrote in message
> >> news:200907131850.18784.jwbrendecke at icanetix.com...
> >>
> >>> Thanks for your reply!
> >>>
> >>> This is my error in the mail (I forgot to indent one more).
> >>>
> >>> The relative path to the .dll from the directory where the application
> >>> is installed is:
> >>>
> >>> plugins\sqldrivers\qsqlited4.dll
> >>
> >> Aw, I thought it was going to be easy! ;)
> >>
> >> I had an issue with an imageformats plugin which I debugged by tracing
> >> into the Qt code that attempted to load the plug-in and saw where it was
> >> failing. Perhaps you could do that here.
> >>
> >> Since you're using VC2005, you have a first class GUI debugger! :-)
> >>
> >> Thanks,
> >> David
> >>
> >> _______________________________________________
> >> Qt-interest mailing list
> >> Qt-interest at trolltech.com
> >> http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> Sometimes setting the env variable QT_DEBUG_PLUGINS=1 and running the
> app helps to track down the issue. if you're not compiling against an
> external sqlite, then there should be nothing missing dll wise. Maybe
> grab a copy of depends.exe and run it on the target system? Sometimes
> that shows up missing dlls that cause load failures.
>
> G'luck :)
More information about the Qt-interest-old
mailing list