Xcode: about other Linker Flags

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.