Xcode的linker(连接器)的other linker flags相关配置问题

一、通过命令行查看 man /user/bin/ld


截取常用内容如下:

Options that control libraries

     -all_load   Loads all members of static archive libraries.


     -ObjC       Loads all members of static archive libraries that implement an Objective-C class or category.


     -force_load path_to_archive

                 Loads all members of the specified static archive library.  Note: -all_load forces all members of all archives to be loaded.  This option allows

                 you to target a specific archive.



二、参考苹果官方文档:Xcode_build_System

截取相关内容如下:

Creating Targets

When you create a project from one of the Xcode project templates, Xcode automatically creates a target foryou. If, however, your project needs to contain more than one target—usually because you are creating morethan one product—you can also add targets to an existing project.

If you are adding targets to your project, chances are you’ve already made a number of decisions about producttype, programming language, and framework. Xcode provides a number of target templates to support yourchoices. The selection of target templates is similar to the selection of project templates. The target specifiesthe target’s product type, a list of default build phases, and default definitions for some build settings. A targettemplate typically includes all build settings and build phases required to build an instance of the specifiedproduct. Unlike the project templates provided by Xcode, the target templates do not specify any default files;you must add files to the target yourself, as described in Managing Target Files (page 28).

Note: Targets created with target templates have no framework references. Any frameworks orlibraries that the target is configured to link with are added to the Other Linker Flags build setting.You can add framework references to the target yourself, as described in Figure 1-10 (page 31)


你可能感兴趣的:(ios,xcode)