Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build PostgreSQL driver for Qt 4.7.4 on GNU/Linux
Qt 6.11 is out! See what's new in the release blog

Build PostgreSQL driver for Qt 4.7.4 on GNU/Linux

Scheduled Pinned Locked Moved Installation and Deployment
12 Posts 3 Posters 12.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #3

    Yes, there is where I looked, but I didn't find it, instead I found qsql_psql.pri

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cincirin
      wrote on last edited by
      #4

      I have qsql_psql.pri here: QtSDK/QtSources/4.7.3/src/sql/drivers/psql/qsql_psql.pri

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #5

        I have it too, but when I try to build the driver, I have the errors described in my first post

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cincirin
          wrote on last edited by
          #6

          So you have qsql_psql.pri in both location ?

          1. QtSDK/QtSources/4.7.3/src/plugins/sqldrivers/psql
          2. QtSDK/QtSources/4.7.3/src/sql/drivers/psql

          At location 1 should be psql.pro

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #7

            Ok, sorry, you're right.
            I find psql.pro in QtSDK/QtSources/4.7.3/src/plugins/sqldrivers/psql and build the driver.
            Thanks for your help.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Donovan
              wrote on last edited by
              #8

              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_
              
              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on last edited by
                #9

                Hi
                @
                cd QtSDK/QtSources/4.7.3/src/plugins/sqldrivers/psql
                qmake "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro
                make
                @

                Hope it helps you

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  Donovan
                  wrote on last edited by
                  #10

                  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.?!

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bobby
                    wrote on last edited by
                    #11

                    "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.

                    "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
                    ---Source unknown

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      Donovan
                      wrote on last edited by
                      #12

                      Thanks for all. Special thanks for bobby.Great it's working.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved