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. Mac - Qt Dylib locations... ?
QtWS25 Last Chance

Mac - Qt Dylib locations... ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
cmakemaclinkingdylibbundle
6 Posts 3 Posters 1.1k 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 1 Feb 2022, 23:06 last edited by
    #1

    Hey

    I'm trying to write batch script to auto build my apps on Mac. Hitting walls left and right sadly. CPack does nothing for me in CMAKE and I'm now trying to collect all my dependencies manually.

    My current problem is that Qt deps points me to >
    @rpath/QtOpenGLWidgets.framework/Versions/A/QtOpenGLWidgets
    Which is a bit of a mystery as to where that is...

    How can I find my directory in Cmake, or any-possible-way of qt dylib locations on mac? where are they located?

    I used Qt Maintance tool to install Qt.

    I tried to auto collect it, but all I get is :

      otool -l failed: 1
    
      error:
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic:
      can't open file: @rpath/QtConcurrent.framework/Versions/A/QtConcurrent (No
      such file or directory)
    
    Call Stack (most recent call first):
    

    Regards
    Dariusz

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mpergand
      wrote on 2 Feb 2022, 00:08 last edited by mpergand 2 Feb 2022, 00:09
      #2

      The frameworks are in the Qt folder:
      Qt5.12.12/5.12.12/clang_64/lib

      In QtCreator your can find this path in Projects->Run->Build Environment :
      DYLD_FRAMEWORK_PATH = Users/me/Qt5.12.12/5.12.12/clang_64/lib

      D 1 Reply Last reply 2 Feb 2022, 10:16
      1
      • M mpergand
        2 Feb 2022, 00:08

        The frameworks are in the Qt folder:
        Qt5.12.12/5.12.12/clang_64/lib

        In QtCreator your can find this path in Projects->Run->Build Environment :
        DYLD_FRAMEWORK_PATH = Users/me/Qt5.12.12/5.12.12/clang_64/lib

        D Offline
        D Offline
        Dariusz
        wrote on 2 Feb 2022, 10:16 last edited by
        #3

        @mpergand Thanks for the ping!
        Sadly its not there
        I dont have clang_64
        I have macos - I take its arm universal version now.

        Screenshot 2022-02-02 at 10.11.01.png

        I don't see any dylib's inside that folder. Unless what I selected its what I want ? not dylib?

        QtCreator poin me to that dir, but there no dylibs there :c

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mpergand
          wrote on 8 Feb 2022, 23:09 last edited by mpergand 2 Aug 2022, 23:12
          #4

          Just for fun, I look at the header of the QtWidgets file

          "cf fa ed fe 07 00 00 01 03 00 00 00 06 00 00 00 1c 00 00 00 00 0c 00 00 85 80 11 02 00 00 00 00"

          struct  mach_header_64 {
              uint32_t  magic;    /* mach magic number identifier */
              cpu_type_t  cputype;  /* cpu specifier */
              cpu_subtype_t cpusubtype; /* machine specifier */
              uint32_t  filetype; /* type of file */
              uint32_t  ncmds;    /* number of load commands */
              uint32_t  sizeofcmds; /* the size of all the load commands */
              uint32_t  flags;    /* flags */
              uint32_t  reserved; /* reserved */
          };
          

          filetype = 6
          in "mach-o/loader.h" you find:
          #define MH_DYLIB 0x6 /* dynamicly bound shared library file*/
          On mac, dynamic libraries are embedded in bundles called frameworks. A framework can have several dylibs even several frameworks (umbrella)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Dariusz
            wrote on 9 Feb 2022, 09:15 last edited by
            #5

            Hmmm yeah, I'm trying to wrap my head around it.

            I need to bundle it all up somehow and CPack does not do anything for some reason on my arm so I'm packing it all by hand.

            Atm workflow is to have post_build command that collects all dylibs & places in my exe bundle & use dynlib cmd tool to relink the exe to newly located dylibs, pain in .... will see how it goes. Probably 10 min after finishing the script I will find a one click solution for it =.=

            A 1 Reply Last reply 9 Feb 2022, 10:28
            0
            • D Dariusz
              9 Feb 2022, 09:15

              Hmmm yeah, I'm trying to wrap my head around it.

              I need to bundle it all up somehow and CPack does not do anything for some reason on my arm so I'm packing it all by hand.

              Atm workflow is to have post_build command that collects all dylibs & places in my exe bundle & use dynlib cmd tool to relink the exe to newly located dylibs, pain in .... will see how it goes. Probably 10 min after finishing the script I will find a one click solution for it =.=

              A Offline
              A Offline
              artwaw
              wrote on 9 Feb 2022, 10:28 last edited by
              #6

              @Dariusz You should use macdeployqt for all things qt, possibly your custom solutions for your custom stuff (additional libs, etc).

              For more information please re-read.

              Kind Regards,
              Artur

              1 Reply Last reply
              0

              1/6

              1 Feb 2022, 23:06

              • Login

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