Qt Forum

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

    Unsolved Building subdirs project with shared libs

    General and Desktop
    2
    6
    284
    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.
    • DiogoPereira98
      DiogoPereira98 last edited by aha_1980

      Hello, I'm build a subdirs project for the first time, it looks like I have done everything correctly but there is something troubling me, when I run the executable from qt creator opens with the desired libs even though I have the option "Add build library search path to..." unchecked, but then I try to run it from terminal and it cannot find the libraries... 2_1549658865730_Captura de ecrã 2019-02-08, às 20.39.01.jpg 1_1549658865730_Captura de ecrã 2019-02-08, às 20.38.33.jpg 0_1549658865729_Captura de ecrã 2019-02-08, às 20.38.25.jpg

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Qt Creator modifies the environment so you may have the DYLD_LIBRARY_PATHS environment variable handled in Qt Creator that you don't have in your terminal, hence the failure.

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

          I see, is there a way for men executable to "know" the path to my libs?
          I've tried this "QMAKE_RPATHDIR += $$PWD/release" in my TEMPLATE subdirs .pro with no success...
          This is my output dir:
          0_1549659351105_Captura de ecrã 2019-02-08, às 20.55.20.jpg

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Run otool -L on your executable as well as on that library and post the output.

            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 Reply Quote 1
            • DiogoPereira98
              DiogoPereira98 last edited by

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Use install_name_tool and modify the libraries id to contain the full path to their current folder.

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