Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Does qmake support a QMAKE_ variable for setting -rpath-link?
QtWS25 Last Chance

Does qmake support a QMAKE_ variable for setting -rpath-link?

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 6.9k 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.
  • A Offline
    A Offline
    acolin
    wrote on last edited by
    #1

    There is QMAKE_RPATHDIR that sets -rpath. But is there, a macro that sets -rpath-link?
    (If not, is it wise to submit a feature request?)

    For now, I'm using unix:LIBS += -Wl,-rpath-link,/path/to/lib

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi

      have you tried with QMAKE_RPATHDIR??

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        acolin
        wrote on last edited by
        #3

        Yes. QMAKE_RPATHDIR sets -rpath, which is different from -rpath-link. The former hardcodes paths into the binary, the latter just tells the linker where to look to satisfy dependencies without hardcoding tha paths.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Sorry,

          I write wrong; I means QMAKE_RPATH

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            acolin
            wrote on last edited by
            #5

            According to the "docs":http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#qmake-lflags-rpath: all of these are the same. Strange that there are three of them, then. Perhaps, it's worth trying if they actually translate into exactly the same link line.

            QMAKE_LFLAGS_RPATH

            This is used on Unix platforms only.

            Library paths in this definition are added to the executable at link time so that the added paths will be preferentially searched at runtime.

            QMAKE_RPATH

            This is used on Unix platforms only.

            Is equivalent to QMAKE_LFLAGS_RPATH.

            QMAKE_RPATHDIR

            This is used on Unix platforms only.

            A list of library directory paths, these paths are added to the executable at link time so that the paths will be preferentially searched at runtime.

            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