This is all hardcoded to qmake by the time of configure. I guess something went wrong with configure.. At least the prefix seems to be not what you intended to.
This is all hardcoded to qmake by the time of configure. I guess something went wrong with configure.. At least the prefix seems to be not what you intended to.
J-P Nurmi
Ok. I will try other solutions.
Thanks a lot for you help anyway
Oh, I almost forgot. You can always place the plugin into sqldrivers-subdir of the application binary.
/path/to/app/binary
/path/to/app/sqldrivers/libqsqlpsql.so
J-P Nurmi
BINGO !!!
It worked fine!!
Thanks a lot ...you're great!
Hi,
I tried to run Robertos example but I can't find the libqsqlpsql files. I tried apt-cache search libsqlpsql with no result. My Qt-version is qt-4.3.3. In the path
/usr/local/Trolltech/Qt-4.3.3/plugins/sqldrivers the only files is:
libqsqlite.so libqsqlite.so.debug
I also tried to search psql in synaptic and downloaded:
postgresql-client
postgresql-client-7.4
postgresql-client-8.1
libqt3-mt-psql
I've got the libqsqlpsql.so but for qt3 so I still get the following errors when I'm running the program: (I tried to copy the libqsqlpsql.so for qt3 in the plugins/sqdrivers path for Qt4.33)
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
Error while trying to open the DB
How can I find the libqslpsql files for qt4.3.3 ?
Any help is deaply apreciated!
gQt
Thanks!
It looks like I have to configure and make Qt again. I can't find the Qt source code for Unix/linux available for downloads. When I type ./configure -help after downloading an unpacking the tar.gz-file I get these options:
{ two posts merged and ./configure -help output removed }
I guess I have to enable sql-pluggins and the psql-dev must be installed before ./configure, make. But I can't find any source/src option here? (My linux distribution is Debian) Any help is greatly apreciated!
Regards
gQt
Last edited by jpn; 11th March 2008 at 10:52. Reason: removed ./configure -help output
ftp://ftp.trolltech.com/qt/source
Yes, anyone can run ./configure -help him/herself and get exactly the same output on X11.When I type ./configure -help after downloading an unpacking the tar.gz-file I get these options:
Yes, if you need SQL-plugins you either turn them on while building Qt by passing appropriate -sql-xxxxx options to configure OR you build the plugin manually after Qt has been built.I guess I have to enable sql-pluggins and the psql-dev must be installed before ./configure, make. But I can't find any source/src option here?
J-P Nurmi
Thanks for the links!
If I understand I can go to the QtDir and type: make confclean, then run the ./configure script with the wright options for sql pluggins: -pluggin-sql-<driver>
or build the QPSQL Plugin on Unix and Mac OS X manually
(for psql)
cd $QTDIR/src/plugins/sqldrivers/psql
qmake -o Makefile "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro
make
My Qt-installation lack the src-dir under QTDIR and I can't find out how to download just the source. the link: ftp://ftp.trolltech.com/qt/source refers only to full Qt-installations, or am I wrong?
Is it a configure option to specify that the src-dir should be downloaded too ? I can't see that from the ./configure -options
Well, you can't re-compile Qt if you installed a binary package from your distribution's repository (because you don't have the sources). So the option is to go grab a source package, for example qt-x11-opensource-src-4.3.4.tar.gz, and compile that by yourself.
J-P Nurmi
Thanks for replying!
That's the strange thing, I downloaded the qt-x11-commercial-src-4.3.3.tar.gz and this file should also be a source package, but I could remove the installation and install the opensource version instead.
Hi,
The src-dir wasn't installed for some reason so I will copy the src-dir from the tar.gz-file to QtDir.
Hi,
Thanks!
I had to copy the srcdir from the .tar.gz file, for som reason the srcdir was not installed. qmake detect all the files:
qmake -o Makefile "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro
But make gives a lot of errors and can't find libpq-fe.h. (This file is no where, tried locate). The errors in qsql_psql.cpp is probably because libpq-fe.h is missing.
the postgresql-client-8.1, postgresql-dev and postgresql-server-dev-8.1 is installed
I tried also to reconfigure qt. (make confclean first) and then
./configure -qt-sql-psql -plugin-sql-psql
Bookmarks