I. about other Linker Flags
In Xcode, there are other Linker flags options under the "Targets" option, where you can fill in the parameters of the Xcode linker, such as:-O BJC,-all_load,-force_load, and so on.
Two, Xcode linker
The linker used by Xcode for Ld–gnu,ld is a software in the GNU toolchain that is primarily used to connect the obj file to an executable file. At the same time you can use your own script to control the behavior of LD, which is you can choose your script through the-t option instead of the default. can be done by
1 |
[OBJC] View plaincopy
- Man LD
|
Learn more.
Three, the main parameters
The main parameter to be said here is the parameters of the LD tool and also the parameters commonly used in other Linker flags.
1.-objc
When using the static class library written by OBJC (objective-c Static library that contains categories), when the program compiles the link, if not in other Linker flags to fill in-OBJC, often error, appears " Selector not recognized ". Bo Master Weakness, the reason is not quite understand. Please consult the Xcode Help documentation for specific reasons.
The role of-OBJC is to load all members of classes, categories, and so on, implemented with OBJC.
2.-all_load
Forces the linker to load all target documents that contain non-OBJC.
3.-force_load
Loads the specified target document. The document path is required behind-force_load, such as:
Target_build_dir Libb. A
Xcode: about other Linker Flags