wiz wrote:I didn't make myself very clear above. I am trying to do this on a Slack 10.1 system which does not appear to have a ready compiled qt postgres
ahhh, ok, no problem. Im running Slack 10.1 with the qt postgres driver after compiling it because its not there as standard.
The file it moaned about was probably libpq-fe.h, libpq.h, or postgres.h or similar.
You DONT have to compile all of qt to get the driver up and running. I did this a while ago, so am a bit sketchy on the exact details.
1. When installing postgresql try putting the source in /usr/local/pgsql/src, then compiling with a prefix of /usr/local/pgsql
2. Add /usr/local/pgsql/lib to /etc/ld.so.conf and run ldconfig
3. Copy just the qt source directory (src) and everything below it eg qt-x11-free-3.x.x/src to /usr/lib/qt/src
4. This is the install procedure, takes seconds.
I've put my example of assuming the pgsql source is in /usr/local/pgsql/src below
qmake -o Makefile "INCLUDEPATH+=/usr/local/pgsql/src/postgresql-8.0.2/src/include /usr/local/pgsql/src/postgresql-8.0.2/src/interfaces/libpq" "LIBS+=-L/usr/lib -lpq" psql.pro
Then you could checkinstall make install it to create a package for use later on, qt sql drivers last for ages before needing a recompile, I was still using 7.4.1 compiled from slack 9.1 with 8.0.0