N
N
Nikita Mikaev2017-11-15 12:48:01
MySQL
Nikita Mikaev, 2017-11-15 12:48:01

How to build QMYSQL driver from Mac in Qt?

Hello ! I'm trying to build a project with the QMYSQL driver. I open help and it says:

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

I work from a mac. echo $QTDIR gives an empty string, going down to the directory where Qt is installed. There is no qtbase folder there, and the corresponding version directory does not have it either. I'm trying to search the entire machine for the sqldrivers folder, it has the following content (attached a screenshot), but without subfolders like mysql.
Путь до mysql: /usr/local/mysql
/usr/local/mysql/include - Include
/usr/local/mysql/lib - Lib

Путь до Qt: /Users/user/Qt5.6.2/

sqldrivers:
5a0c0cf0aab99656883917.png
mysql/lib:
5a0c0cf97eb11431086926.png
qt:
5a0c0d01c7e76641084912.png
qt/5.6:
5a0c0d0af21d1560620578.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question