Xcode Build Search Paths设置
2015-09-22 10:29
627 查看
include <> 引用编译器的类库路径下的头文件
include “” 引用工程目录的相对路径的头文件
include 是编译指令,在编译时,编译器会将相对路径替换成绝对路径,因此,头文件绝对路径=搜索路径+相对路径。
Xcode Build Settings 下 Search Paths设置搜索路径
Header Search Paths:头文件搜索路径设置
$(SRCROOT)宏和$(PROJECT_DIR)宏都指xxx.xcodeproj所在的父目录
例如:引用工程testDemo/scr/test.h 头文件,
Header Search Paths中添加$(SRCROOT),引用为include “scr/test.h"
如果在Header Search Paths中添加$(SRCROOT)/scr,那么头文件引用直接引用 include “test.h”
如果设置了 Always Search
User Paths 为 yes,编译器会先搜索User Header Search Paths路径下的目录,在这种情况下include <string.h>,User Header Search Paths 搜索目录下的文件会覆盖系统的头文件
include “” 引用工程目录的相对路径的头文件
include 是编译指令,在编译时,编译器会将相对路径替换成绝对路径,因此,头文件绝对路径=搜索路径+相对路径。
Xcode Build Settings 下 Search Paths设置搜索路径
Header Search Paths:头文件搜索路径设置
$(SRCROOT)宏和$(PROJECT_DIR)宏都指xxx.xcodeproj所在的父目录
例如:引用工程testDemo/scr/test.h 头文件,
Header Search Paths中添加$(SRCROOT),引用为include “scr/test.h"
如果在Header Search Paths中添加$(SRCROOT)/scr,那么头文件引用直接引用 include “test.h”
如果设置了 Always Search
User Paths 为 yes,编译器会先搜索User Header Search Paths路径下的目录,在这种情况下include <string.h>,User Header Search Paths 搜索目录下的文件会覆盖系统的头文件
相关文章推荐
- UITableViewCell 中的单选控制 UITableViewCellAccessoryCheckmark
- 对文本框内容进行实时判断
- request.getRemoteAddr()获取的值为0:0:0:0:0:0:0:1
- 自学IOS(一)UI之Hello World与加法计算器
- keyChain保存uuid实现唯一标识
- iOS开发之UI_UIScrollView(下)
- NGUI基本控件制作
- comparison of floating point numbers with equality operator. possible loss of precision while rounding values
- 我的Android进阶之旅------>adbd cannot run as root in production builds 的解决方法
- does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE
- (绝对有用)iOS获取UUID,并使用keychain存储
- Java String与StringBuffer、StringBuilder的区别
- [UI基础]day01(代码)
- Servlet生命周期方法,request.getRequestDispatcher
- 源码推荐(9.22):利用UIScrollView实现几个页面的切换,纯代码实现水滴和波浪动画
- iOS软件开发 设置UITextView输入内容位置从左上角开始
- iOS开发之UI_UIScrollView(上)
- easyUI之datebox
- IOS巅峰之UICollectionView详解
- Servlet中The requested resource is not available错误