I am confronted with the double bind. On the one hand, for one of the 3rd party static libraries my iPhone application uses, the linker flag -all_load
has to be set in the application project or target settings. Otherwise, the app crashes at run-time not finding some symbols called internally from the lib. On the other hand, for another 3rd party static lib, -all_load
must not be set on application level, or the app won't build thanks to a "duplicate symbols" linker error.
To solve this issue, I now want to use force_load
instead of load_all
, as it due to documentation it does the same like all_load
, but only for the passed path or lib-file, instead of all libs.
The problem with force_load
is, I do not have a clue how to pass a path or file as parameter with it, when passing it via XCode project- or target-settings. All syntax-possibilities I tried either lead xcode to thinking it's another linker flag instead of a parameter to the previous one, or the linker throwing syntax related errors, or the flag simply does nothing at all.
I also opened the .pbxproj-file in a text-editor to edit it to the correct command line syntax manually. But when reloading the project with XCode, it auto-changes the syntax into interpreting the parameter to force_load
as a separate flag.
Anyone have an idea on this issue?