⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)
Problems with building the QMYSQL Plugin on Ubuntu 18.04
I'm trying to build the plugin using this doc: http://doc.qt.io/Qt-5/sql-driver.html#qmysql.
After doing first two steps,which are
2)qmake -- MYSQL_PREFIX=/usr/local
i'm being stuck on the final one
which throws an error:
qsql_mysql.cpp: In function ‘QSqlField qToField(MYSQL_FIELD*, QTextCodec*)’:
qsql_mysql.cpp:333:115: error: no matching function for call to ‘QSqlField::QSqlField(QString, QVariant::Type, QString)’
In file included from qsql_mysql.cpp:46:0:
/usr/include/x86_64-linux-gnu/qt5/QtSql/qsqlfield.h:60:5: note: candidate: QSqlField::QSqlField(const QSqlField&)
QSqlField(const QSqlField& other);
I also have this issue alongside
$ ldd libqsqlmysql.so
gives me "libmysqlclient.so.18 => not found" among the text
Has anybody any suggestions?
Hi and welcome to devnet,
Which version of MySQL are you using ?
Did you install the development package of that MySQL version ?
$ mysql -V
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper
And the package...I've done this thing:
$ sudo apt-get install mysql-client libmysqlclient-dev
But the problem is still present.
I just realised something, is it me or are you trying to build the MySQL plugin using your system provided Qt ?
You are likely calling the wrong
qmakeversion. Use the full path to it.
I may sound silly, but i don't get it...sorry.
I used "$ sudo apt install qt5-default" qmake to appear.
Before the installation i could only get message:
" qmake: could not find a Qt installation of '' ".
"$ which qmake" says, that i have only one path (that is used by default) - /usr/bin/qmake
btw, qmake version is 3.1
In that case, why don't you install the Qt 5 SQL module development package from your distribution ?
AndyStep last edited by
I also tried "$ sudo apt-get install qtbase5-dev" and "$ make sub-mysql" still says, that mismatching function wants 3 parameters, while it can only take 1 or 2 (depends on which realization is used).
Again: why are you trying to build the plugins for your distribution provided Qt ? Juste install the Qt 5 SQL module and the plugins ?
Basically: libqt5sql5 and libqt5sql5-mysql