Solved How to deploy a Qt application that uses SQLite on OS X
-
I am trying to deploy a Qt application that uses SQLite on OS X. I simply ran the command:
macdeployqt MyApplication.app -dmg
and I get the following error:
ERROR: no file at "/opt/local/lib/mysql55/lib/libmysqlclient.18.dylib"
I already read about SQLite plugin on this link but I could not understand how it works.
Note: I have a folder: ......./Qt5.3.2/5.3/clang_64/plugins/sqldrivers/
that contains:
libqsqlite.dylib
libqsqlite_debug.dylib
and some other libs related to other sql drivers.
Any idea how can I solve this?
Note 1: in my PRO file I am just setting this: QT += sql
Note 2: I'm using Qt 5.3.Thanks
-
@KelvinSP This is for MySQL: /opt/local/lib/mysql55/lib/libmysqlclient.18.dylib
You don't need it if you don't use MySQL. -
Thanks @jsulm. What do you mean with "this is for MySQL"? This is weird because I am not using MySQL, only SQLite. Can I just ignore this error?
-
Hi,
Yes you can.
macdeployqt deploys all the plugins by default since it doesn't know which one you'll be using.
Note that you can build the .dmg in two steps, first run macdeployqt, then remove all the unused Sql plugins and then create the image.
-
Thank you so much @SGaist . Is there a problem if I don't remove the unused Sql plugins? Or it will just increase the DMG file size?
-
No, it just takes place.