Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Portable Qt application for Mac
Qt 6.11 is out! See what's new in the release blog

Portable Qt application for Mac

Scheduled Pinned Locked Moved Installation and Deployment
7 Posts 2 Posters 2.6k Views 1 Watching
  • 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.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    Hi everybody.
    I have just compiled an application on my Mac. On my Mac the application works. Now I want to copy ad use it on another mac without QtSDK installed. On Linux I can use this row "LIBS += -Wl,-rpath=\$$ORIGIN/libs" for define the directory of the required qt libs but on Mac does not works.
    How can I do for define the directory of the required qt libs?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Peppy
      wrote on last edited by
      #2

      Try set it up in application http://doc.qt.nokia.com/4.7-snapshot/qcoreapplication.html#addLibraryPath :

      @
      QApplication::addLibraryPath(QString);
      @

      1 Reply Last reply
      0
      • mrdebugM Offline
        mrdebugM Offline
        mrdebug
        wrote on last edited by
        #3

        I have solved with "plugins" but not with "libs".

        For example: Where must I put the library "QtDeclarative"?
        I have add to application
        "QApplication::addLibraryPath("libs");"
        Now where I must create the "libs" directory?
        Which are the files to copy in libs from "qtDeclarative.framework" directory?

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Peppy
          wrote on last edited by
          #4

          Use full path (you can use QApplication::applicationDirPath() to return full path to your application):
          @
          QApplication::addLibraryPath(QApplication::applicationDirPath()+"/libs");
          @

          and there you go.

          1 Reply Last reply
          0
          • mrdebugM Offline
            mrdebugM Offline
            mrdebug
            wrote on last edited by
            #5

            Ok and then where I must create the libs directory? Which is the files that I must put in?
            See the error:

            Dyld Error Message:
            Library not loaded: /Users/USER//QtDeclarative.framework/Versions/4/QtDeclarative
            Reference from: /Users/USER/
            /DomusBossTouch.app/Contents/MacOS/DomusBossTouch

            Need programmers to hire?
            www.labcsp.com
            www.denisgottardello.it
            GMT+1
            Skype: mrdebug

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Peppy
              wrote on last edited by
              #6

              I think, here:
              /DomusBossTouch.app/Contents/MacOS/DomusBossTouch/libs

              1 Reply Last reply
              0
              • mrdebugM Offline
                mrdebugM Offline
                mrdebug
                wrote on last edited by
                #7

                Solved using macdeployqt in QTDIR/bin/

                Need programmers to hire?
                www.labcsp.com
                www.denisgottardello.it
                GMT+1
                Skype: mrdebug

                1 Reply Last reply
                0

                • Login

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