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. PostgreSQL plugin building in Windows 7
Forum Updated to NodeBB v4.3 + New Features

PostgreSQL plugin building in Windows 7

Scheduled Pinned Locked Moved Installation and Deployment
18 Posts 2 Posters 8.5k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #8

    It can't find the libpq-fe.h header file, are you sure you added the include path where that file can be found ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

      The file is in C:\PostgreSQL\9.3\include:

      !http://imageshack.com/a/img545/2936/i5kg.jpg(libpq-fe)!

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #10

        Change the \ to / for the paths you give to qmake. Also on windows Qt uses unix style path, so you are giving it invalid paths.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • T Offline
          T Offline
          TerraxQt
          wrote on last edited by
          #11

          same result :)

          ......\sql\drivers\psql\qsql_psql.cpp:59:22: fatal error: libpq-fe.h: No such
          file or directory
          #include <libpq-fe.h>
          ^
          compilation terminated.
          Makefile.Release:493: 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/5.1.1/Src/qtbase/src/plugins/sqldriver
          s/psql'
          makefile:38: recipe for target 'release-all' failed
          mingw32-make: *** [release-all] Error 2

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #12

            Check the content of the Makefile to see if there's a line containing the path to PostgreSQL includes

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

              The Makefile which is in C:/Qt/5.1.1/Src/qtbase/src/plugins/sqldrivers/psql has the line:

              Command: C:\Qt\5.1.1\mingw48_32\bin\qmake.exe INCLUDE+=“C:/PostgreSQL/9.3/include” LIBS+=“C:/PostgreSQL/9.3/lib/libpq.lib” -o Makefile psql.pro

              The Makefile which is in C:\Qt\5.1.1\mingw48_32\bin has the line:

              Command: C:\Qt\5.1.1\mingw48_32\bin\qmake.exe "INCLUDEPATH+=C:\Program Files\PostgreSQL\9.3\include" "LIBS+=C:\Program Files\PostgreSQL\9.3\lib\libpq.lib" -o Makefile C:\Qt\5.1.1\Src\qtbase\src\plugins\sqldrivers\psql\psql.pro

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #14

                Why do you have a Makefile in the C:\Qt\5.1.1\mingw48_32\bin folder ?

                You should clean everything and then try to build the plugin again

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  TerraxQt
                  wrote on last edited by
                  #15

                  I don't know why there is a Makefile :) By clean everything you mean re-install Qt and PostgreSQL ?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #16

                    No, PostgreSQL seems to be installed fine, just clean the sources and check whether you have something unusual in the mingw related folders

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      TerraxQt
                      wrote on last edited by
                      #17

                      Here is what I did:
                      -Re-installed Qt
                      -Opened the Console from Qt's folder in start menu
                      -Executed:

                      C:\Qt\5.1.1\Src\qtbase\src\plugins\sqldrivers\psql>qmake INCLUDEPATH+="C:/PostgreSQL/9.3/include" LIBS+="C:/PostgreSQL/9.3/lib/libpq.lib

                      After that:
                      C:\Qt\5.1.1\Src\qtbase\src\plugins\sqldrivers\psql>mingw32-make

                      And the result:

                                   from c:\qt\tools\mingw48_32\lib\gcc\i686-w64-mingw32\4.8.0\incl
                      

                      ude\c++\bits\stl_algo.h:65,
                      from c:\qt\tools\mingw48_32\lib\gcc\i686-w64-mingw32\4.8.0\incl
                      ude\c++\algorithm:62,
                      from C:\Qt\5.1.1\mingw48_32\include/QtCore/qglobal.h:80,
                      from C:\Qt\5.1.1\mingw48_32\include/QtCore/qnamespace.h:45,
                      from C:\Qt\5.1.1\mingw48_32\include/QtCore/qobjectdefs.h:45,
                      from C:\Qt\5.1.1\mingw48_32\include/QtCore/qobject.h:48,
                      from C:\Qt\5.1.1\mingw48_32\include/QtCore/qplugin.h:45,
                      from C:\Qt\5.1.1\mingw48_32\include\QtSql/qsqldriverplugin.h:45
                      ,
                      from main.cpp:42:
                      c:\qt\tools\mingw48_32\i686-w64-mingw32\include\sys\timeb.h:90:8: error: previou
                      s definition of 'struct timespec'
                      struct timespec {
                      ^
                      Makefile.Release:397: recipe for target '.obj/release_shared/main.o' failed
                      mingw32-make[1]: *** [.obj/release_shared/main.o] Error 1
                      mingw32-make[1]: Leaving directory 'C:/Qt/5.1.1/Src/qtbase/src/plugins/sqldriver
                      s/psql'
                      makefile:38: recipe for target 'release-all' failed
                      mingw32-make: *** [release-all] Error 2

                      Is it possible that for Qt ver. 5.1.1 the building of the plugin is done in different way?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #18

                        Just stumbled upon "this":http://qt-project.org/forums/viewthread/24460
                        Worth a try

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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