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. Building subdirs project with shared libs
QtWS25 Last Chance

Building subdirs project with shared libs

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 504 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.
  • DiogoPereira98D Offline
    DiogoPereira98D Offline
    DiogoPereira98
    wrote on last edited by aha_1980
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • DiogoPereira98D Offline
        DiogoPereira98D Offline
        DiogoPereira98
        wrote on last edited by DiogoPereira98
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          1
          • DiogoPereira98D Offline
            DiogoPereira98D Offline
            DiogoPereira98
            wrote on last edited by
            #5

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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
              1

              • Login

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