Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Completely lost trying to get QMYSQL working on OS X
Forum Updated to NodeBB v4.3 + New Features

Completely lost trying to get QMYSQL working on OS X

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 749 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.
  • M Offline
    M Offline
    macmee
    wrote on last edited by
    #1

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7

    this is the error I get when I run my application. I am on OS X. Installing SQL drivers appears to be a painful task and a poorly documented one. From the QT site:

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

    $QTDIR is not only not defined, but this directory doesn't even exist. This is the closest I could find:

    /Users/me/Qt5.2.0/5.2.0/clang_64/plugins/sqldrivers/
    

    And it is filled with dylibs for all the installed drivers.

    The instructions above on the QT website are confusing, I do not understand what I am supposed to do. Could anyone provide me with step by step instructions on how to get this driver working?

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

      Hi and welcome to devnet,

      You need to first install Qt's sources, and then execute the qmake/make commands from there.

      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

      • Login

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