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. Library not found on Mac OS
Forum Updated to NodeBB v4.3 + New Features

Library not found on Mac OS

Scheduled Pinned Locked Moved Solved General and Desktop
librarymac os
23 Posts 2 Posters 11.8k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #8

    Why DEPENDPATH ? It's not the same thing as QMAKE_RPATHDIR .

    Also, I'd rather try with the full path using the OUT_PWD variable with QMAKE_RPATHDIR

    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
    • A Offline
      A Offline
      Amott
      wrote on last edited by
      #9

      I just copy/paste the wrong line, I have tested with QMAKE_DIRPATH.
      It didn't change with OUT_PWD.
      Maybe there is a thing to do with command install_name_tool on all library ? I will take a look on this trail

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

        Again, it's not QMAKE_DIRPATH, it's QMAKE_RPATHDIR

        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
        • A Offline
          A Offline
          Amott
          wrote on last edited by
          #11

          erf... I should go back to school and learn to read again !
          so now I have : QMAKE_RPATHDIR=OUT_PWD/../debug
          but, nothing has changed

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

            Did you forgot the double $ before OUT_PWD?

            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
            • A Offline
              A Offline
              Amott
              wrote on last edited by
              #13

              Oh... Yes... It explains why it didn't work !
              The command macdeploy now works fine ! A lot a thing appeared in the .app. But the .tx is still not detected even after copying it on the right directory

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

                Can you remind me what these .tx files are ?

                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
                • A Offline
                  A Offline
                  Amott
                  wrote on last edited by
                  #15

                  In my case .tx is a lib provided by ODA library.
                  When my app start, I use a function "loadapp" from ODA, to load my .tx. After debugging it seams that this function is looking for the tx into <myapp.app>/Contents/MacOS directory, so I placed my lib here but it still doesn't detect it

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

                    macdeployqt won't handle them because it currently only targets .framework and .dylib.

                    If we want to nitpick, putting "plugin" in the MacOS folder is wrong from a bundle point of view.

                    You have to write a script that copies these .tx file at the right place and call install_name_tool on them to update the paths to all their dependencies (excluding the system libraries)

                    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
                    • A Offline
                      A Offline
                      Amott
                      wrote on last edited by
                      #17

                      ok so if I understood correctly, I have to write a script that first build my .app, then copy the .tx into MacOS and finally apply install_name_tool ?

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

                        Not necessarily. I was more thinking about a post-macdeployqt script that would handle the .tx files.

                        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
                        • A Offline
                          A Offline
                          Amott
                          wrote on last edited by
                          #19

                          ok, given that I'm an intern and my internship will end next week, I prefer writing a bash script that makes everything, that will be easier for my workmate in the future.
                          Is there anyway to tell Qt that it has to call this script after compiling ?

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

                            What do you mean by everything ? Run macdeployqt or build your application + macdeployqt + .tx deployment ?

                            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
                            • A Offline
                              A Offline
                              Amott
                              wrote on last edited by
                              #21

                              Yes, after compiling, the script calls macdeployqt, and install every tx properly, the application should work after that (I hope).
                              For the moment I just call macdeployqt and copy every tx into MacOS.

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

                                It's been a long time since I've done this but IIRC you should be able to do that adding a custom target.

                                See qmake's adding custom targets documentation.

                                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
                                • A Offline
                                  A Offline
                                  Amott
                                  wrote on last edited by
                                  #23

                                  Thanks for your help ! I will take a look a that, and post another thread if I have a lot of problems.

                                  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