XCode Build Settings中几种Search Paths

本文详细解释了iOS开发中三种重要的搜索路径:Framework Search Path、Header Search Path和Library Search Path的作用及配置方法。这些路径用于在项目中定位第三方框架、头文件和库文件的位置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

From:http://stackoverflow.com/questions/8342982/ios-clarify-different-search-paths


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.

In Mac development, it's set automatically if you drag a 3rd party framework into the project. Otherwise, just set it to the container directory where you saved the framework.

In xcconfig files you use this variable:

FRAMEWORK_SEARCH_PATHS = "/path/to/frameworks/container/directory"

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 xcconfig files you use this variable:

LIBRARY_SEARCH_PATHS = "/path/to/libraries/container/directory" 

All three can hold a list of paths, with quotes, separated by space.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值