[SOLVED]MySQL library problem
-
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
-
You should, unless the libmysqlclient is very different from the one Qt was built with.
-
That's the PostgreSQL plugin. Like I suggested before, just remove the plugins you don't need from your bundle.
-
I didn't suggest to remove all other plugins, just the SQL related plugins you don't use
-
Start it from the command line, what does it tell you ?
-
@SGaist Strangely the ERROR disappear and working app bundle was created w/out changing anything.Unfortunately the app created database.db in the path i set (in this case in the program.app/contents/MacOS but can't write inside!
Starting the app from QT can write in to the db, but starting it outside Qt doesn't write, but creates it.