macosqtsqlitemacdeployqt

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?

Thanks


Solution

  • As SGaist answer here:

    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.

    It means that if I am not using MySQL in my application I can just ignore this error message.