I want to conditionally link the library (I have this library for the iOS device, but I do not have it for Simulator). I am using Xcode 4.6 and iOS 6.1.
I read a question (and a couple of similar ones): iOS static conditional link library
-weak_library linker flag
I tried ry to build a project with the following flags:
-weak_library LibraryNameWithPath
However, this gives me an error:
ld: file not found: LibraryNameWithPath
-weak-l linker flag
I tried to build it using the following flags:
-weak-lShortLibraryName
And got the same results:
ld: library not found for -lShortLibraryName
thoughts
Why the hell is he checking the existence of a library if it is clearly marked as a weak link?
Is there a way to do conditional binding at build time (against using dlopen, dlclose and friends at run time)?
source share