Build PostgreSQL driver for Qt 4.7.4 on GNU/Linux
-
Hello,
I'm trying to build the qsql_psql driver on Fedora 15 by following the documentation. First in the src directory, instead of a .pro file, I find qsql_psql.pri. After qmake, I type make, I have the error
@qsql_psql.cpp:48:23: fatal error: qsqlerror.h: No such file or directory@
So I add @QT += sql@ in qsql_psql.pri
But, now when I try to build it I have this error
@/usr/lib/gcc/i686-redhat-linux/4.6.0/../../../crt1.o: In function_start': (.text+0x18): undefined reference to
main'@
It's looking for a main method. Why ? How to build it ?
Thanks. -
I 'm know it's old topic.But I have the same problem. So I will be happy. If you tell me what comand You were writing in Yours terminall qmake ??? and make???.But any path??? Like this :
_cd $QTDIR/src/plugins/sqldrivers/psql qmake -o Makefile "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro make_
-
Hi,thanks.
But still not working.This is my terminal.
marcin@marcin-K50IN:~$ cd /home/marcin/Pobrane/qt-everywhere-opensource-src-4.7.3/src/plugins/sqldrivers/psql
marcin@marcin-K50IN:~/Pobrane/qt-everywhere-opensource-src-4.7.3/src/plugins/sqldrivers/psql$ qmake "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro
marcin@marcin-K50IN:~/Pobrane/qt-everywhere-opensource-src-4.7.3/src/plugins/sqldrivers/psql$ make g++ -c -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include/pgsql -I. -o main.o main.cpp
main.cpp:42: fatal error: qsqldriverplugin.h: Nie ma takiego pliku ani katalogu(In eng.The directory dosen't exist)
compilation terminated.
make: *** [main.o] Błąd 1
marcin@marcin-K50IN:~/Pobrane/qt-everywhere-opensource-src-4.7.3/src/plugins/sqldrivers/psql$Im using Ubuntu 10.10. And I install Qt by website , not source. I should change path for all header files, no way.?!
-
"I just figured this out with MySQL":http://developer.qt.nokia.com/forums/viewthread/8206 but it's the same process. I also compiled the postgresql driver at the same time with success.
Good luck.