[SOLVED]MySQL library problem
-
I got the same error.
BTW I think the application works (by default all sqldrivers plugins are copied)
The installer installs sqlite, mysql, odbc and postgresql also if you don't have the libraries installed
UPDATE Qt drivers are loaded at runtime so there's no way to understand which drivers are used; for this reason macdeplyqt copy all drivers
-
Hi,
Do you have the MySQL libraries installed in /opt ? (i.e. using macports) If not then the error message is normal.
-
Then you probably have the MySQL libraries in a path like /usr/local/mysql/. Right ?
-
Then you have to do
install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql/PATH_TO_libmysqlclient.X.dylib PATH_TO_libqsqlmysql.dylib
In any case, if you are not using it in your application, you can also ignore the message and remove the plugin from the bundle.
[edit: added missing target SGaist]
-
You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?
-
@mcosta not it doesn't, macdeployqt parses the output of otool to get the dependencies of the libraries/plugins of Qt. AFAICT, the plugins are built with dependencies coming from MacPorts hence the libmysqlclient.18.dylib in /opt/local/lib/
-
@SGaist said:
/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib
install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql-5.6.25-osx10.8-x86_64/lib/libmysqlclient.18.dylib
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input -
Which version of OS X and Qt are you using ?
I've corrected the example line
-
@SGaist said:
PATH_TO_libqsqlmysql.dylib
install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql-5.6.25-osx10.8-x86_64/lib/libmysqlclient.18.dylib Users/jorost/Qt5.4.2/5.4/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: Users/jorost/Qt5.4.2/5.4/clang_64/plugins/sqldrivers/libqsqlmysql.dylib (No such file or directory) -
You're missing a slash before Users