Specifying which library to use for iOS/Simulator/MacOS

  • 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:


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


    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?

  • Lifetime Qt Champion


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

  • 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.

  • @sandy.martel23 thank you very much!

Log in to reply