Completely lost trying to get QMYSQL working on OS X
-
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7this 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?
-
Hi and welcome to devnet,
You need to first install Qt's sources, and then execute the qmake/make commands from there.