QMYSQL Driver installation



  • Hello, for the past 3 days I've been trying to install the QMYSQL driver but I can't get it anyhow to work. I've tried a lot of guides and in all of them I get stuck in a moment.

    I'm running on a mac OS and using the qt 4.8.4 source and have the mysql connector c 6.1.0 installed.
    Here's the steps I've done so far:

    1. I've changed the working directory to /Users/Alexandru/Downloads/mysql-connector-c-6.1.0/lib then used the following commands to link the libraries in the /usr/lib folder:

    sudo ln -s libmysqlclient.18.dylib /usr/lib/libmysqlclient.dylib
    sudo ln -s libmysqlclient.18.dylib /usr/lib/libmysqlclient_r.dylib
    sudo ln -s libmysqlclient.18.dylib /usr/lib/libmysqlclient_r.18.dylib
    sudo ln -s libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

    1. Changed the working directory to $QTDIR/src/plugins/sqldrivers/mysql and ran the following command:

    qmake -spec macx-g++ -o Makefile "INCLUDEPATH+=/Users/Alexandru/Downloads/mysql-connector-c-6.1.0/include" "LIBS+=-L/usr/lib -lmysqlclient_r" mysql.pro

    1. In the same folder I issue the command:

    make

    And I get the following error:
    ld: library not found for -lmysqlclient_r
    collect2: ld returned 1 exit status
    make[1]: *** [libqsqlmysql_debug.dylib] Error 1
    make: *** [debug] Error 2

    I also found this article: http://www.techsmog.com/index.php/2011/05/04/fixing-ld-library-not-found-for-lmysqlclient_r-during-gem-install-mysql2-on-osx-w-mamp/ where it says how to fix the problem but I don't have any ".la" library files which to link and when I tried with the ".a" file I still get the same error.
    Can someone please help me?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.