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

Unable to compile SQL plugin

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
15 Posts 5 Posters 1.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.
  • Christian EhrlicherC Online
    Christian EhrlicherC Online
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #6

    @Anton1978 said in Unable to compile SQL plugin:

    /usr/include/x86_64-linux-gnu/qt5/QtCore/5.12.8

    Still using the wrong include paths. Make sure to start with a clean source dir.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    1 Reply Last reply
    0
    • Anton1978A Offline
      Anton1978A Offline
      Anton1978
      wrote on last edited by
      #7

      I really don't understand why this is happening? I am explicitly specifying which qmake to use - '~/Qt/5.15.2/gcc_64/bin/qmake'
      Even if I write like this
      ~/Qt/5.15.2/gcc_64/bin/qmake -- PSQL_INCDIR=~/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers
      the result does not change
      why is the file used
      /usr/include/x86_64-linux-gnu/qt5/QtSql/5.12.8/QtSql/private/qsqldriver_p.h

      I think me need some rest

      1 Reply Last reply
      0
      • Anton1978A Offline
        Anton1978A Offline
        Anton1978
        wrote on last edited by Anton1978
        #8

        Another interesting point, if you open the SQLPlagin project in QTCreator, you can see that the sources with errors
        /home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/sqldrivers.pro
        have 3 errors

        /home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/psql/qsql_psql.cpp:152: error: no matching constructor for initialization of 'QSqlDriverPrivate' 
        
        :-1: error: [Makefile:845: .obj/qsql_sqlite.o] Error 1
        
        /home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/psql/qsql_psql.cpp:152: error: no matching function for call to ‘QSqlDriverPrivate::QSqlDriverPrivate(QSqlDriver::DbmsType)’
        /home/anton/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/psql/qsql_psql.cpp:152:68: error: no matching function for call to ‘QSqlDriverPrivate::QSqlDriverPrivate(QSqlDriver::DbmsType)’
          152 |     QPSQLDriverPrivate() : QSqlDriverPrivate(QSqlDriver::PostgreSQL) {}
        

        He writes to me about these errors when using make.
        But for others it compiles.
        Some kind of mysticism.

        1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #9

          Again: start with a clean source dir and call the correct qmake.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • eyllanescE Offline
            eyllanescE Offline
            eyllanesc
            wrote on last edited by eyllanesc
            #10

            It is not necessary to compile the plugin but it is only necessary to install the client, in the case of Ubuntu it is enough with:

            sudo apt-get install libpq-dev
            

            If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

            Anton1978A 1 Reply Last reply
            0
            • eyllanescE eyllanesc

              It is not necessary to compile the plugin but it is only necessary to install the client, in the case of Ubuntu it is enough with:

              sudo apt-get install libpq-dev
              
              Anton1978A Offline
              Anton1978A Offline
              Anton1978
              wrote on last edited by
              #11

              @eyllanesc
              It's installed, everything doesn't work

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

                Hi,

                As @Christian-Ehrlicher wrote, you have to clean the sources before starting fresh. There are also hidden files in the folder that you need to remove (you can find that here).

                If you want to be on the safe side, you can even to an out of source build.

                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
                • Anton1978A Anton1978

                  @eyllanesc
                  It's installed, everything doesn't work

                  eyllanescE Offline
                  eyllanescE Offline
                  eyllanesc
                  wrote on last edited by
                  #13

                  @Anton1978 It is very strange since I have tested an example in GH actions and it works correctly for me, on the other hand if you want to compile it recommends you delete the files generated by your incorrect execution. You can also follow my answer in SO:https://stackoverflow.com/a/65568190/6622587

                  If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                  Anton1978A 1 Reply Last reply
                  0
                  • eyllanescE eyllanesc

                    @Anton1978 It is very strange since I have tested an example in GH actions and it works correctly for me, on the other hand if you want to compile it recommends you delete the files generated by your incorrect execution. You can also follow my answer in SO:https://stackoverflow.com/a/65568190/6622587

                    Anton1978A Offline
                    Anton1978A Offline
                    Anton1978
                    wrote on last edited by
                    #14

                    @eyllanesc said in Unable to compile SQL plugin:

                    @Anton1978 It is very strange since I have tested an example in GH actions and it works correctly for me, on the other hand if you want to compile it recommends you delete the files generated by your incorrect execution. You can also follow my answer in SO:https://stackoverflow.com/a/65568190/6622587

                    This my question too)). The second day I am at war with this plugin.
                    Thanks for prompting me to git this plugin, it really helped, now it remains to figure out how to connect the compiled plugin to my QtCreator.

                    jsulmJ 1 Reply Last reply
                    0
                    • Anton1978A Anton1978

                      @eyllanesc said in Unable to compile SQL plugin:

                      @Anton1978 It is very strange since I have tested an example in GH actions and it works correctly for me, on the other hand if you want to compile it recommends you delete the files generated by your incorrect execution. You can also follow my answer in SO:https://stackoverflow.com/a/65568190/6622587

                      This my question too)). The second day I am at war with this plugin.
                      Thanks for prompting me to git this plugin, it really helped, now it remains to figure out how to connect the compiled plugin to my QtCreator.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #15

                      @Anton1978 said in Unable to compile SQL plugin:

                      how to connect the compiled plugin to my QtCreator

                      You only need to call "make install" after make, then it should work.

                      It would be interesting to know why the preinstalled plug-in doesn't work. To do so set QT_DEBUG_PLUGINS=1 before starting your app. Then you should see what is happening.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1

                      • Login

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