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 change the @rpath value on macos
Forum Updated to NodeBB v4.3 + New Features

how change the @rpath value on macos

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 2.1k 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.
  • P Offline
    P Offline
    Princein
    wrote on last edited by
    #1

    Hi:
    I developed a qt project on macos, my executable file link the qt framework like this :
    @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.11.0, current version 5.11.3)

    now I want to change the @rpath to the custom directory path which in my .app content directory, what should I do in my .pro file, thanks a lot!

    RatzzR 1 Reply Last reply
    0
    • P Princein

      Hi:
      I developed a qt project on macos, my executable file link the qt framework like this :
      @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.11.0, current version 5.11.3)

      now I want to change the @rpath to the custom directory path which in my .app content directory, what should I do in my .pro file, thanks a lot!

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by Ratzz
      #2

      @Princein

      You can do something like this

      unix:QMAKE_RPATHDIR += /usr/mylib
      

      This may help.

      --Alles ist gut.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Princein
        wrote on last edited by
        #3

        it not work on macos

        RatzzR SGaistS 2 Replies Last reply
        0
        • P Princein

          it not work on macos

          RatzzR Offline
          RatzzR Offline
          Ratzz
          wrote on last edited by Ratzz
          #4

          @Princein
          May be DEFINES += MY_LIB_PATH=/usr/mylib
          and use "$$MY_LIB_PATH"

          --Alles ist gut.

          1 Reply Last reply
          0
          • P Princein

            it not work on macos

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Princein said in how change the @rpath value on macos:

            it not work on macos

            Can you give more details ?

            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
            0
            • hskoglundH Online
              hskoglundH Online
              hskoglund
              wrote on last edited by
              #6

              Had a similar problem, I resorted to use the tools inside Xcode's toolchain, there are 2 of them: otool and install_name_tool

              otool you use to dump what .dlls the app will try to load. Easiest is to first navigate down to the MacOS subdirectory where the .exe file is located, then to list the load command (assuming your app is called untitled) try:
              otool -l untitled

              To change the @rpath loading commands, you use install_name_tool, for example:
              install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @rpath/YourCustomDirectoryPath untitled

              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