Mac Os X Mysql driver install
-
Hi,
I want to use QMYSQL but when I try to compile:
~/Qt/5.10.0/clang_64/bin/qmake -- MYSQL_PREFIX=/usr/local Project ERROR: You cannot configure sqldrivers separately within a top-level build.
How can I use Mysql from Qt creator ? QSQLITE is ok but Mysql still not working ?
Is there straight forward way to do this ?
-
Hi,
Where exactly are you calling qmake in ?
What is your original problem ?
-
Late night I found the solution:
Mac Os X
Qt 5.11 and mysql 5.7.23
I used Qt internal setup:
key is : MYSQL_LIBS=-lmysqldI hope it helps others
Qt plugin mysql : ~/Qt/5.11.0/Src/qtbase/src/plugins/sqldrivers/mysql make ve make install internal client kullan : mysql.pro: TARGET = qsqlmysql HEADERS += $$PWD/qsql_mysql_p.h SOURCES += $$PWD/qsql_mysql.cpp $$PWD/main.cpp MYSQL_LIBS=-lmysqld INCLUDEPATH +=/usr/local/Cellar/mysql@5.7/5.7.23/include/mysql #LIBS += -llibmysqld QMAKE_USE += mysql OTHER_FILES += mysql.json PLUGIN_CLASS_NAME = QMYSQLDriverPlugin include(../qsqldriverbase.pri)