Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPSQL driver - Postgresql 9 & Windows 7
Forum Updated to NodeBB v4.3 + New Features

QPSQL driver - Postgresql 9 & Windows 7

Scheduled Pinned Locked Moved General and Desktop
17 Posts 9 Posters 21.9k 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.
  • Z Offline
    Z Offline
    ZapB
    wrote on last edited by
    #8

    I think you would be best to build the 64-bit version of Qt in a new directory. That way you can keep your existing 32-bit install working. They can live perfectly happy side by side. So in the end you coudl have dirs like this:

    @
    C:\Qt\4.7.2-x86
    C:\Qt\4.7.2-x64
    @

    or whatever you choose to name the directories as. Then to build against one or the other just be sure to use the corresponding version of qmake form within the appropriate directory.

    There should be plenty of docs on how to configure and build Qt on Windows both in the official Qt docs and on devnet.

    Nokia Certified Qt Specialist
    Interested in hearing about Qt related work

    1 Reply Last reply
    0
    • T Offline
      T Offline
      topocc
      wrote on last edited by
      #9

      've solved the problem, I'm in the same.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rodrigocg
        wrote on last edited by
        #10

        https://sites.google.com/site/qxormpostgres/generar-driver-postgres-qt

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rodrigocg
          wrote on last edited by
          #11

          GCC 32bit requires 32bit postgres.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bjanuario
            wrote on last edited by
            #12

            You will need to compile the drivers, then you will get into plugin Qt dir the files libqsqlpsql.so and or qsqlpsql4.dll if windows, then the files libpq.so, libpq.so.5 and libpq.so.5.4 sould go to your lib folder ex(/usr/lib).

            1 Reply Last reply
            0
            • T Offline
              T Offline
              topocc
              wrote on last edited by
              #13

              mingw compile postgres with fixed and so the driver can generate.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lavds
                wrote on last edited by
                #14

                I have x32 postgres 9.2
                I try make QPSQL driver, and receive this error. ????

                @C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEP
                ATH+=C:\PostgreSQL\9.2\include" "LIBS+=C:\PostgreSQL\9.2\lib\libpq.a" psq
                l.pro
                Qt: Untested Windows version 6.2 detected!

                C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>make
                make -f Makefile.Debug
                make[1]: Entering directory C:/QtSDK/QtSources/4.8.1/src/plugins/sqldrivers/psq l' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB - DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_TH READ_SUPPORT -I"c:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\QtCore" -I"c:\QtSDK\ Symbian\SDKs\Symbian1Qt473\include\QtSql" -I"c:\QtSDK\Symbian\SDKs\Symbian1Qt473 \include" -I"c:\PostgreSQL\9.2\include" -I"c:\Program" -I"Files\PostgreSQL\9.2\i nclude" -I"c:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\ActiveQt" -I"debug" -I"c: \QtSDK\Symbian\SDKs\Symbian1Qt473\mkspecs\default" -o debug\main.o main.cpp g++: CreateProcess: No such file or directory make[1]: *** [debug/main.o] Error 1 make[1]: Leaving directory C:/QtSDK/QtSources/4.8.1/src/plugins/sqldrivers/psql
                '
                make: *** [debug] Error 2@

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  angelicaP
                  wrote on last edited by
                  #15

                  after i run C:[Qt dir]\Src\qtbase\src\plugins\sqldrivers\psql>mingw32-make

                  i get this error:

                  mingw32-make -f Makefile.Release all
                  mingw32-make[1]: Entering directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/
                  sqldrivers/psql'
                  g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W
                  all -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCE
                  PTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"C:\program" -
                  I"files\postgresql\9.2\include" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include" -I"C:
                  \Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\in
                  clude\QtSql\5.0.2" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql\5.0.2\QtSql"
                  -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtCore" -I".moc\release_shared" -I"..
                  ......\mkspecs\win32-g++" -o .obj\release_shared\qsql_psql.o ......\sql\driv
                  ers\psql\qsql_psql.cpp
                  ......\sql\drivers\psql\qsql_psql.cpp:58:22: fatal error: libpq-fe.h: No such
                  file or directory
                  compilation terminated.
                  Makefile.Release:483: recipe for target '.obj/release_shared/qsql_psql.o' failed

                  mingw32-make[1]: *** [.obj/release_shared/qsql_psql.o] Error 1
                  mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/s
                  qldrivers/psql'
                  makefile:38: recipe for target 'release-all' failed
                  mingw32-make: *** [release-all] Error 2

                  any idea how to get over? the QPSQL driver is not loaded yet.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    CMEXOTA
                    wrote on last edited by
                    #16

                    [quote author="angelicaP" date="1370121154"]
                    any idea how to get over? the QPSQL driver is not loaded yet. [/quote]

                    Any luck solving the problem?

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      CMEXOTA
                      wrote on last edited by
                      #17

                      [quote author="angelicaP" date="1370121154"]
                      any idea how to get over? the QPSQL driver is not loaded yet. [/quote]

                      Any luck solving the problem?

                      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