Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved Problem with building MySql plugin

    Installation and Deployment
    2
    7
    1284
    Loading More Posts
    • 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
      azravian last edited by

      I need to use MySql with my app and trying to build the plugin. I tried to build plugins using the instruction

      cd $QTDIR/src/plugins/sqldrivers/mysql
      qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
      make
      

      after using the instruction with the qmake i got a warning saying
      WARNING: /home/azravian/qt-sources/qtbase/src/plugins/sqldrivers/qsqldriverbase.pri:4: Unable to find file for inclusion qt_plugin
      Project MESSAGE: Warning: unknown QT: core-private
      Project MESSAGE: Warning: unknown QT: sql-private

      And then using make give the output error as

      main.cpp:34:30: fatal error: qsqldriverplugin.h: No such file or directory
      #include <qsqldriverplugin.h>
      ^
      compilation terminated.
      make: *** [main.o] Error 1

      I have tried much but can't seem to solve it

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Where did you get Qt's sources ?
        Are you sure you are calling the qmake matching the version of Qt you are using ?

        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 Reply Quote 0
        • A
          azravian last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Use the full path when calling qmake so you ensure that you are using the correct version.

            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 Reply Quote 0
            • A
              azravian @SGaist last edited by azravian

              @SGaist yes thank you for your reply. I called qmake from Qt5.5 and it worked finally.
              Thank you for your help

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                You're welcome !

                Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

                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 Reply Quote 0
                • A
                  azravian @SGaist last edited by

                  @SGaist yes sure sir
                  Thanks Again for your kind help.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post