This will compile the QPSQL driver as a plugin.Originally Posted by graeme
And this should compile it into the Qt library.Originally Posted by graeme
This will compile the QPSQL driver as a plugin.Originally Posted by graeme
And this should compile it into the Qt library.Originally Posted by graeme
It works Quite why I'm still a little perplexed but here is what I have done:
- Downloaded 4.1.2 src - previously I have 4.1.1 mingw installer
- Configured with: configure -debug-and-release -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -qt-sql-psql -L C:\psql\lib
- Recompiled my app: placed the pgsql dlls in the same directory as the exe
I had also done the following prior to configure
So the differences are:Qt Code:
set QTDIR=C:\Qt\4.1.2 set PATH=C:\Qt\4.1.2\bin set PATH=%PATH%;C:\psql\include set PATH=%PATH%;C:\psql\lib set PATH=%PATH%;C:\MinGW\binTo copy to clipboard, switch view to plain text mode
- Slightly newer version of Qt - doubt if that makes any difference
- I have the src rather than the installer - might make a difference
- I have compiled it into Qt rather than as a plugin - might make a difference, although I doubt it.
When I get time I will compile Qt with pgsql as a plug in. I can't think of any difference at the moment.
jacek, thank you very much for your support and your valuable ideas.
graeme.
Last edited by graeme; 18th April 2006 at 16:44.
Most probably there used to be an issue with the PostgreSQL DLL's, which is why you were asked to run the Dependency Walker on the plugin. Unfortunately that didn't help.Originally Posted by graeme
Yes, that might make a difference, although it shouldn't.Originally Posted by graeme
Have you installed an ODBC driver for PostgreSQL?
Try: psqlodbc-08_00_0101.zip
Then set up an ODBC connection. I run PostgreSQL on a Linux server and connect to it from this W2K workstation using an ODBC driver setup through the ODBC Manager on the Control Panel.
To compile PostgreSQL plugins.
1) Install PostgreSQL and be careful to select the libraries for installation. (I installed every feature)
2) Install QT4 for windows and use the following configure command:
(In place of "C:\Progra~1\PostgreSQL...." point to where you installed PostgreSQL.)
configure -plugin-sql-psql -qt-sql-psql
-I C:\Progra~1\PostgreSQL\8.1\include
-L C:\Progra~1\PostgreSQL\8.1\lib
-L C:\Progra~1\PostgreSQL\8.1\lib\libpq.a
cd E:\Qt\4.1.0\src\plugins\sqldrivers\psql
qmake -o Makefile "INCLUDEPATH+=C:\Progra~1\PostgreSQL\8.1\inclu de" "LIBS+=C:\Progra~1\PostgreSQL\8.1\lib C:\Progra~1\PostgreSQL\8.1\lib\ms\libpq.lib" psql.pro
qmake
make or nmake
and the plugins were installed in:
E:\Qt\4.1.0\plugins\sqldrivers
I use PostgreSQL 8.1.x as a standin for our Oracle server. IF I had my way we'd use PostgreSQL and not Oracle.
Bookmarks