Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Tools
    2
    5
    6331
    Loading More Posts
    • 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
      acolin last edited by

      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 Reply Quote 0
      • M
        mcosta last edited by

        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 Reply Quote 0
        • A
          acolin last edited by

          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 Reply Quote 0
          • M
            mcosta last edited by

            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 Reply Quote 0
            • A
              acolin last edited by

              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 Reply Quote 0
              • First post
                Last post