Qt OSX deploying SQL drivers.
-
wrote on 16 Jul 2014, 16:11 last edited by
Hello guys, I am currently having some troubles to deploy my application and run it properly: I am using SQL driver for my database but when I try to launch application, it says:
@
// The list of all libraryPaths() from QCoreApplication.
("/Users/pb1/Projects/build-app-Debug/src/app/app.app/Contents/plugins", "/Developer/Qt/5.3/clang_64/plugins", "/Users/pb1/Projects/build-app-Debug/src/app/app.app/Contents/MacOS")"/Users/pb1/Projects/build-app-Debug/src/app"
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QMYSQL QMYSQL3 QSQLITE QODBC QODBC3 QPSQL QPSQL7
"Driver not loaded Driver not loaded" -1 "-1"
@I have manually added MySQL driver to @./Contents/plugins/@ and @./Contents/plugins/sqldrivers/@ but it did not work. What shall I do? I don't have any clue, thanks.
-
Hi,
did you use macdeployqt before deploying ?
-
wrote on 16 Jul 2014, 21:51 last edited by
I have added:
@
QMAKE_POST_LINK += $$quote(macdeployqt $${OUTPUT}/App.app)
@ -
You should rather run it from the command line, it should not be a part of the build process
-
wrote on 17 Jul 2014, 19:34 last edited by
okay, the I have run it from external shell but it still did not help. Still it can't reach the plugin.
-
Did you get any error messages when running macdeployqt ?
-
wrote on 17 Jul 2014, 21:05 last edited by
No, not at all.
-
That's pretty surprising, which version of Qt are you using ?
Did you call it on a clean rebuild of your application ?
-
wrote on 17 Jul 2014, 21:21 last edited by
Qt 5.3.0 and not, not yet... I will give it a shot ASAP.
-
wrote on 30 Jul 2014, 12:38 last edited by
Nothing really happened. :/
-
Sql plugins should be deployed however you might have problem with the sql client library, a patch for macdeployqt is waiting review.
I just spotted one thing that is wrong on your end: on OS X the folder name is not plugins it's PlugIns