Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to deploy a Qt application that uses SQLite on OS X

How to deploy a Qt application that uses SQLite on OS X

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KelvinSP
    wrote on last edited by KelvinSP
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • K KelvinSP

      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

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @KelvinSP This is for MySQL: /opt/local/lib/mysql55/lib/libmysqlclient.18.dylib
      You don't need it if you don't use MySQL.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • K Offline
        K Offline
        KelvinSP
        wrote on last edited by KelvinSP
        #3

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          K 1 Reply Last reply
          1
          • SGaistS SGaist

            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.

            K Offline
            K Offline
            KelvinSP
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              No, it just takes place.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved