Specifying which library to use for iOS/Simulator/MacOS
-
wrote on 19 Jul 2016, 15:27 last edited by
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?
-
Hi,
IIRC, you can use the
simulator
scope in your .pro file for that. -
wrote on 19 Jul 2016, 23:44 last edited by
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. -
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.wrote on 20 Jul 2016, 13:47 last edited by@sandy.martel23 thank you very much!
1/4