Xcode如何知道在哪里寻找框架? [英] How does Xcode know where to look for a framework?

查看:105
本文介绍了Xcode如何知道在哪里寻找框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例:我导入这样的框架:

Example: I import a framework like this:

#import <Cocoa/Cocoa.h>

现在"Cocoa/Cocoa.h"路径是什么?我的意思是... Xcode从哪里开始看?在哪里配置?那实际上是一条路径还是什么?真正的"Cocoa/Cocoa.h"是什么?那里有名称空间和框架吗?还是什么?

Now what's that "Cocoa/Cocoa.h" path? I mean... from where does Xcode start looking? Where is this configured? And is that actually a path or something? What's "Cocoa/Cocoa.h" really? A namespace and a framework in there? Or what else?

推荐答案

这在xcode文档中:

This is in the xcode documentation:

http://developer.apple.com/mac/library/documentation/DeveloperTools/gcc-4.0.1/cpp/Search-Path.html#Search-Path

2.3搜索路径 GCC在几个不同的位置查找标头.在普通的Unix系统上,如果没有其他说明,它将在#include in中查找请求的标头:

2.3 Search Path GCC looks in several different places for headers. On a normal Unix system, if you do not instruct it otherwise, it will look for headers requested with #include in:

 /usr/local/include
 libdir/gcc/target/version/include
 /usr/target/include
 /usr/include

对于C ++程序,它还将首先显示在/usr/include/g ++-v3中.在上面,目标是配置GCC为其编译代码的系统的规范名称;通常但并非总是与其运行的系统的规范名称相同.版本是使用中的GCC版本.

For C++ programs, it will also look in /usr/include/g++-v3, first. In the above, target is the canonical name of the system GCC was configured to compile code for; often but not always the same as the canonical name of the system it runs on. version is the version of GCC in use.

</snip>

</snip>

这篇关于Xcode如何知道在哪里寻找框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆