Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cross compiling QMYSQL driver for RPi3

Cross compiling QMYSQL driver for RPi3

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 1.4k 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.
  • V Offline
    V Offline
    Vertebro
    wrote on last edited by
    #1

    Hello,

    I have set up cross compilation for the raspberry pi, and it works perfectly.
    Except since I added SQL queries in my project, I use QtSql module, and I rebuilt the driver with the RPi sysroot, like you should do.

    But I use MySQL and it seems that every single sql driver is available except for QMYSQL...

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QSQLITE2 QODBC QODBC3 QPSQL QPSQL7 QTDS QTDS7
    QSqlQuery::exec: database not open
    

    See this list, not even the one I want.

    I searched, but my machine (ubuntu 16.04) can run my app perfectly with the plugin QMYSQL. But when I rebuilt it using the qmake of my sysroot, it creates a makefile that doesn't contain instructions to build QMYSQL, which is weird because the sqldrivers.pro file does contain them.

    0_1524652311149_e4c2a305-b48c-4bc8-9b5f-61044e5e5bda-image.png

    0_1524652365896_f92813b1-4d0e-48b7-9034-2bd6dc08bb95-image.png

    Thanks in advance !

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

      Hi,

      Since you marked you thread as solved, did you successfully built the plugin ?

      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
      • V Offline
        V Offline
        Vertebro
        wrote on last edited by
        #3

        Yes, it was pretty hard, I had to manually edit several files to add mysql in the make list, and also during building an include failed "mysql.h", I had to edit this include to the absolute path of mysql.h and it worked

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

          What sysroot are you using to cross-compile Qt ? Did you forget to put the relevant MySQL files in it ?

          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
          • J Offline
            J Offline
            jars121
            wrote on last edited by jars121
            #5

            I'm attempting the exact same thing at the moment as per this system thread.

            Any chance you could elaborate on how you solved the issue?

            1 Reply Last reply
            0

            • Login

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