[Qt-interest] Drivers for PSQL
phep
phep-lists at teletopie.net
Tue Jan 12 23:17:03 CET 2010
Jose Victor Reynoso a écrit :
> I´m trying to use the SQL Module in Qt_SKD_Win_OpenSource 2009.05 but I
> don't known how to install the plug-in drivers any one knows where I can
> find some kind of "manual".
I got a similar problem.
Short version:
I managed to compile both the psql plugin as indicated in
http://qt.nokia.com/doc/4.6/sql-driver.html#how-to-build-the-qpsql-plugin-on-windows
and my own application but when I run my program it fails on the point
the psql code should be accessed with an error talking about a missing
driver (the machine is not at hand presently and I don't remember the
exact wording). I have put all the asked dll files in my own binary
directory (from my memory : QtCore4.dll, QtGui4.dll, QtSql4.dll, the
just-built .dll files found in $QTDIR/plugins/sqldrivers/psql, and 2
mingw-related dll, AFAICR) but this not seems to be sufficient. Do I
need to re-configure Qt with the -plugin-sql-driver ? I'm a little bit
nervous about it for the reasons explained below.
Long version:
I once (more than one year ago) successfully managed to compile (with
MinGW) Qt (then 4.4.3) configured with the -qt-sql-psql flag against a
postgresql 8.3.6 compiled with msys. Then, after compiling my own
application I just needed to put Qt's dll (Core, Gui, Sql) and libpq.dll
in the same directory my application binary was in to make it run
smoothly. So far so good.
Since I work almost exclusively on Linux and don't necessarily have a
Microsoft box around on a regular basis I didn't make other tries until
last week. Unfortunately I came across a problem with the build of Qt
4.6 failing while dealing with Webkit stuff. This problem has been
described with someone in this list :
http://lists.trolltech.com/pipermail/qt-interest/2009-October/013495.html
but the workaround given then did not me let go much further, the build
failing a little bit later with an error I could not find anything about
on the web. I tried to use the -no-webkit flag but this time the build
failed since it seems QtScript has some sort of dependencies on Webkit.
Besides, as I plan to make use of webkit later on in this application I
don't like much this option.
I then started again with a fresh, re-installed Qt and a pre-compiled
8.4.2 postgresql. I followed the explanations at
http://qt.nokia.com/doc/4.6/sql-driver.html#how-to-build-the-qpsql-plugin-on-windows
This work quite flawlessly and I proceeded to recompile my app without
noticeable problems. I then moved the .dll in my own binary directory.
But the run failed as is explained above.
Where should I put those dll's files (and which of them?) to make them
available to my binary? If juggling whith those files, do I really need
to reconfigure/recompile all of Qt? (by the way, why are there no
-no-examples or -no-demos flags for Qt's configure?)
TIA,
pp
More information about the Qt-interest-old
mailing list