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. Problems with building the QMYSQL Plugin on Ubuntu 18.04
Forum Updated to NodeBB v4.3 + New Features

Problems with building the QMYSQL Plugin on Ubuntu 18.04

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 2 Posters 1.7k Views 2 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.
  • A Offline
    A Offline
    AndyStep
    wrote on last edited by AndyStep
    #1

    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
    1)cd $QTDIR/qtbase/src/plugins/sqldrivers
    2)qmake -- MYSQL_PREFIX=/usr/local
    i'm being stuck on the final one
    3)make sub-mysql
    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)’
    ),qDecodeMYSQLType(int(field->type),field->flags),toUnicode(tc, field->table));
    ^
    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?

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

      Hi and welcome to devnet,

      Which version of MySQL are you using ?
      Did you install the development package of that MySQL version ?

      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
      1
      • A Offline
        A Offline
        AndyStep
        wrote on last edited by AndyStep
        #3

        Hi, thanks!
        $ 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.

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

          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 qmake version. Use the full path to it.

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

          A 1 Reply Last reply
          1
          • SGaistS SGaist

            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 qmake version. Use the full path to it.

            A Offline
            A Offline
            AndyStep
            wrote on last edited by AndyStep
            #5

            @SGaist
            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

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

              In that case, why don't you install the Qt 5 SQL module development package from your distribution ?

              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
              1
              • A Offline
                A Offline
                AndyStep
                wrote on last edited by
                #7

                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).

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

                  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

                  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
                  1

                  • Login

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