Help with mysql driver @ os x
Hello,
I’m trying to install the mysql driver in OS X 1.6.4
I was reading the documentation, it seem easy. I compiled and install it, first time the $QTDIR env-var was not right, even corrected it, QT still not found the driver.
libqsqlmysql.dylib and libqsqlmysql_debug.dylib are both present in /Developer/Applications/Qt/plugins/sqldrivers
Can anybody help me?
8 replies
I tried, the output is:
Iniciando /Users/elminster/arti/arti.app/Contents/MacOS/arti…
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC QPSQL7 QPSQL
(”/Developer/Applications/Qt/plugins”, “/Users/elminster/arti/arti.app/Contents/MacOS”)
/Users/elminster/arti/arti.app/Contents/MacOS/arti finalizó retornando 0
The files are in the directory, i tried even use the QPluginLoader, it do not work.
It’s posible i builded the files in the wrong way?
The output is:
otool -L /Developer/Applications/Qt/plugins/sqldrivers/libqsqlmysql.dylib/Developer/Applications/Qt/plugins/sqldrivers/libqsqlmysql.dylib: libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0) libmysql.16.dylib (compatibility version 16.0.0, current version 16.0.0) QtSql.framework/Versions/4/QtSql (compatibility version 4.6.0, current version 4.6.2) QtCore.framework/Versions/4/QtCore (compatibility version 4.6.0, current version 4.6.2) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
I had the same problem.
I’m using this script to build the plugin:
then you must relink the plugin using command
install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib libqsqlmysql.dylibThis is a good solution for a local install but not for deploying apps. In this case you should link using the @executable_path
similar problem here:
http://developer.qt.nokia.com/forums/viewthread/5258/
thanks
You must log in to post a reply. Not a member yet? Register here!



