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. QMYSQL Driver installation

QMYSQL Driver installation

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 1.5k 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.
  • A Offline
    A Offline
    alex_bongoJump
    wrote on last edited by
    #1

    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?

    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