iOS:Xcode Build Settings(二)--一些设置(值)

本文详细介绍了iOS开发中Xcode的Build Settings,包括文件后缀的作用,如.h用于头文件声明,.m和.mm的区别,以及.search path中的Framework search path、Header search path和Library search path的设置和应用场景。此外,还探讨了Other Linker Flags的用途,如-ObjC、-all_load和-force_load在解决第三方库问题中的应用及其潜在影响。
摘要由CSDN通过智能技术生成

文件后缀名

  • h :头文件。头文件包含类,类型,函数和常数的声明。
  • .m :源代码文件。这是典型的源代码文件扩展名,可以包含Objective-C和C代码。
  • .mm :源代码文件。带有这种扩展名的源代码文件,除了可以包含Objective-C和C代码以外还可以包含C++代码。仅在你的Objective-C代码中确实需要使用C++类或者特性的时候才用这种扩展名
  • .cpp:只能编译C++;
    注意:.m 和.mm 的区别是告诉gcc 在编译时要加的一些参数。当然.mm还可以命名成.m,但在编译时要手动加参数(麻烦)。

search path

  • Framework search path:where to search frameworks (.framework bundles) in addition to system frameworks paths. Not used very much in iOS development, officially there is no developer iOS frameworks.
  • Header search path:where to search for header files (.h files) in addition to system paths. Usually you’ll need it if you are using a 3rd party library. Set it to the directory where you have the header files. If you use a directory to include the header (example: #import “mylibrary/component.h”) set it to the parent directory.
    In xcconfig files you use this variable:
    HEADER_SEARCH_PATHS = “/path/to/headers/container/directory
  • Library search path:where to search for library files in addition to system paths. Xcode will set it automatically if you drag a library (.a files) into the project. To set it manually, use the directory where the library is located.
    In
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值