Unable to compile SQL plugin
-
@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.
-
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.hI think me need some rest
-
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. -
Again: start with a clean source dir and call the correct qmake.
-
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
@eyllanesc
It's installed, everything doesn't work -
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.
-
@eyllanesc
It's installed, everything doesn't work@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
-
@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
@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. -
@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.@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.