[SOLVED]MySQL library problem
-
Hi,
how did you run
macdeployqt
??Have you checked everything is ok according to this (http://doc.qt.io/qt-5/osx-deployment.html)??
-
@mcosta said:
-verbose=3
i got this (no errors on the syntax!!!):
Usage: macdeployqt app-bundle [options]Options:
-verbose=<0-3> : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug
-no-plugins : Skip plugin deployment
-dmg : Create a .dmg disk image
-no-strip : Don't run 'strip' on the binaries
-use-debug-libs : Deploy with debug versions of frameworks and plugins (implies -no-strip)
-executable=<path> : Let the given executable use the deployed frameworks too
-qmldir=<path> : Deploy imports used by .qml files in the given path
-always-overwrite : Copy files even if the target file exists
-codesign=<ident> : Run codesign with the given identity on all executablesmacdeployqt takes an application bundle as input and makes it
self-contained by copying in the Qt frameworks and plugins that
the application uses.Plugins related to a framework are copied in with the
framework. The accessibilty, image formats, and text codec
plugins are always copied, unless "-no-plugins" is specified.See the "Deploying an Application on Qt/Mac" topic in the
documentation for more information about deployment on Mac OS X. -
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