Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Specifying which library to use for iOS/Simulator/MacOS
Forum Update on Monday, May 27th 2025

Specifying which library to use for iOS/Simulator/MacOS

Scheduled Pinned Locked Moved Solved Mobile and Embedded
ios qmake xcode
4 Posts 3 Posters 1.2k 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
    DRoscoe
    wrote on 19 Jul 2016, 15:27 last edited by
    #1

    The application I am writing uses a third-party framework. I am able to include the framework easy enough, but I have a question regarding its dependencies.

    The framework needs:

    libxml2
    libz
    

    The issue is that these libraries exist in more than one location:

    /usr/lib
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
    

    The iPhoneOS versions have .tbd extensions and the iPhoneSimulator and MacOS versions have .dylib

    When I want to specify the library dependencies for my third-party framework, do I have to explicitly tell qmake which to use depending on the target platform?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 19 Jul 2016, 22:54 last edited by
      #2

      Hi,

      IIRC, you can use the simulator scope in your .pro file for that.

      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
      • S Offline
        S Offline
        sandy.martel23
        wrote on 19 Jul 2016, 23:44 last edited by
        #3

        It should always be specified as the /usr/lib ones. The linker will pick the right one relative to the target SDK you build for.
        .tbd are not libraries, they are text files (Text-Based stub Dylib), they simply tell the linker how to link and find the real dylib at runtime. The real iPhoneOS libz is at /usr/lib/libz.1.dylib on the device itself.

        D 1 Reply Last reply 20 Jul 2016, 13:47
        1
        • S sandy.martel23
          19 Jul 2016, 23:44

          It should always be specified as the /usr/lib ones. The linker will pick the right one relative to the target SDK you build for.
          .tbd are not libraries, they are text files (Text-Based stub Dylib), they simply tell the linker how to link and find the real dylib at runtime. The real iPhoneOS libz is at /usr/lib/libz.1.dylib on the device itself.

          D Offline
          D Offline
          DRoscoe
          wrote on 20 Jul 2016, 13:47 last edited by
          #4

          @sandy.martel23 thank you very much!

          1 Reply Last reply
          0

          1/4

          19 Jul 2016, 15:27

          • Login

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