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. Static build for SQL plugin
Forum Updated to NodeBB v4.3 + New Features

Static build for SQL plugin

Scheduled Pinned Locked Moved General and Desktop
69 Posts 3 Posters 41.6k 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #7

    It still gives same error message! nothing changed!
    [code]release_static" -I"." -I"C:\Qt-5.1.0-Static-Win32\qtbase\mkspecs\win32-g++" -o .
    obj\release_static\qsql_psql.o drivers\psql\qsql_psql.cpp
    drivers\psql\qsql_psql.cpp:59:22: fatal error: libpq-fe.h: No such file or direc
    tory
    #include <libpq-fe.h>
    ^
    compilation terminated.
    Makefile.Release:3319: recipe for target '.obj/release_static/qsql_psql.o' faile
    d
    mingw32-make[3]: *** [.obj/release_static/qsql_psql.o] Error 1
    mingw32-make[3]: Leaving directory 'C:/Qt-5.1.0-Static-Win32/qtbase/src/sql'
    Makefile:34: recipe for target 'release' failed
    mingw32-make[2]: *** [release] Error 2
    mingw32-make[2]: Leaving directory 'C:/Qt-5.1.0-Static-Win32/qtbase/src/sql'
    Makefile:207: recipe for target 'sub-sql-make_first' failed
    mingw32-make[1]: *** [sub-sql-make_first] Error 2
    mingw32-make[1]: Leaving directory 'C:/Qt-5.1.0-Static-Win32/qtbase/src'
    makefile:40: recipe for target 'sub-src-make_first' failed
    mingw32-make: *** [sub-src-make_first] Error 2

    C:\Qt-5.1.0-Static-Win32\qtbase>[/code]

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbnoimi
      wrote on last edited by
      #8

      BTW, I looked for libpq-fe.h manually and I found it in C:/PostgreSQL/9.1/include; So I doubt that -I C:/PostgreSQL/9.1/include -L C:/PostgreSQL/9.1/lib/ are incorrect parameters.

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

        Did you use a capital i for the include line ?

        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
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #10

          [quote]
          Did you use a capital i for the include line ?
          [/quote]
          Yes, I used your suggestion literally

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

            Strange... Try editing the plugin pro file and add the paths there

            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
            • M Offline
              M Offline
              mbnoimi
              wrote on last edited by
              #12

              [quote]
              Strange… Try editing the plugin pro file and add the paths there
              [/quote]

              I got same exact result although I start a complete new build!

              C:/Qt/Qt5.1.0-static/qtbase/src/plugins/sqldrivers/psql/psql.pro content

              [code]TARGET = qsqlpsql

              SOURCES = main.cpp
              OTHER_FILES += psql.json
              include(../../../sql/drivers/psql/qsql_psql.pri)

              PLUGIN_CLASS_NAME = QPSQLDriverPlugin
              include(../qsqldriverbase.pri)

              LIBS += -LC:/PostgreSQL/9.1/lib -lpq

              INCLUDEPATH += C:/PostgreSQL/9.1/include
              [/code]

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

                Can you run the configure script with -v to see if something comes up in there ?

                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
                • M Offline
                  M Offline
                  mbnoimi
                  wrote on last edited by
                  #14

                  [quote]
                  Can you run the configure script with -v to see if something comes up in there ?
                  [/quote]
                  There is no such option in configure script!

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

                    Sure there is. It's --verbose or -v

                    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
                    • M Offline
                      M Offline
                      mbnoimi
                      wrote on last edited by
                      #16

                      [quote]
                      Sure there is. It’s —verbose or -v
                      [/quote]
                      This is incorrect, down below you can see the output of configure script!

                      [code]C:\Qt\Qt5.1.0-static\qtbase>configure -no-warnings-are-errors -qt-pcre -qt-libpn
                      g -ltcg -release -developer-build -static -qt-sql-sqlite -qt-sql-psql -qt-zlib -
                      qt-libjpeg -opengl desktop -nomake examples -nomake tests -verbose
                      Unknown option ?verbose
                      Usage: configure [options]

                      Installation options:

                      These are optional, but you may specify install directories.[/code]

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

                        --verbose with two -

                        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
                        • M Offline
                          M Offline
                          mbnoimi
                          wrote on last edited by
                          #18

                          [quote]—verbose with two –
                          [/quote]
                          Still incorrect!

                          [code]C:\Qt\Qt5.1.0-static\qtbase>configure -no-warnings-are-errors -qt-pcre -qt-libpn
                          g -ltcg -release -developer-build -static -qt-sql-sqlite -qt-sql-psql -qt-zlib -
                          qt-libjpeg -opengl desktop -nomake examples -nomake tests --verbose
                          Unknown option -?verbose
                          Usage: configure [options]

                          Installation options:

                          These are optional, but you may specify install directories.

                          -prefix <dir> ...... This will install everything relative to <dir>[/code]
                          
                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #19

                            Then it's not the configure script... It's the configure.exe you are using. Which indeed does not have a verbose output...

                            Then check the Makefile generated for the PostgreSql plugin to see if it contains the paths you've added

                            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
                            • M Offline
                              M Offline
                              mbnoimi
                              wrote on last edited by
                              #20

                              [quote]Then it’s not the configure script… It’s the configure.exe you are using. Which indeed does not have a verbose output…[/quote]
                              No, it's the script. Any way to be sure that I called the right script I added .bat (as you can see below); I still get same error!

                              [code]C:\Qt\Qt5.1.0-static\qtbase>configure.bat -no-warnings-are-errors -qt-pcre -qt-l
                              ibpng -ltcg -release -developer-build -static -qt-sql-sqlite -qt-sql-psql -qt-zl
                              ib -qt-libjpeg -opengl desktop -nomake examples -nomake tests --verbose
                              Unknown option -?verbose
                              Usage: configure [options]

                              Installation options:

                              These are optional, but you may specify install directories.

                              -prefix <dir> ...... This will install everything relative to <dir>[/code]
                              

                              [quote]Then check the Makefile generated for the PostgreSql plugin to see if it contains the paths you’ve added[/quote]
                              I looked into MakeFile where configure.bat exists but I couldn’t find any mentioning to "postgresql" or "psql"

                              P.S.

                              • May you please take a look to the generated MakeFile and the modified Postgresql .pro file from:
                                http://mbnoimi.me/tmp/Makefile
                                http://mbnoimi.me/tmp/psql.pro
                                I created MakeFile by using:
                                [code]C:\Qt\Qt5.1.0-static\qtbase>configure.bat -no-warnings-are-errors -qt-pcre -qt-libpng -ltcg -release -developer-build -static -qt-sql-sqlite -qt-sql-psql -qt-zlib -qt-libjpeg -opengl desktop -nomake examples -nomake tests[/code]
                              • Because --verbose option not recognized by configure.bat
                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #21

                                The pro file seems ok

                                You need to look at the Makefile from the folder of the PostgreSql plugin

                                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
                                • M Offline
                                  M Offline
                                  mbnoimi
                                  wrote on last edited by
                                  #22

                                  [quote]You need to look at the Makefile from the folder of the PostgreSql plugin[/quote]
                                  I couldn’t find Makefile in Postgresql plugin!

                                  c:/Qt/Qt5.1.0-static/qtbase/src/plugins/sqldrivers/psql content

                                  @main.cpp
                                  psql.json
                                  psql.pro
                                  psql.pro.user
                                  README@

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

                                    The Makefile should have been generated in a subfolder in the build directory

                                    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
                                    • M Offline
                                      M Offline
                                      mbnoimi
                                      wrote on last edited by
                                      #24

                                      [quote]
                                      The Makefile should have been generated in a subfolder in the build directory
                                      [/quote]
                                      Where can I find build directory?

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        mbnoimi
                                        wrote on last edited by
                                        #25

                                        BTW, May I suggest to test your suggestions or at least read about them before posting from your memory.
                                        It seems you're mixing between Windows & Linux configurations.

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          mbnoimi
                                          wrote on last edited by
                                          #26

                                          I found this link which it talks about static building but unfortunately it done with Qt4 which isn't work perfectly with Qt5.

                                          The issue still on how to add Postgresql paths to configure.bat to be able to add them during make process mingw32-make

                                          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