Xcode 没有使用“标题搜索路径”来查找我的头文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16431341/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode is not using 'Header Search Path' to find my header files
提问by Nick
I have just downloaded and compiled curl. In my /usr/include folder I can see folder, 'curl' and I can see that I do, indeed, have '/usr/include/curl/curl.h'. However I cannot talk XCode into looking there when compiling.
我刚刚下载并编译了 curl。在我的 /usr/include 文件夹中,我可以看到文件夹“curl”,我可以看到我确实有“/usr/include/curl/curl.h”。但是我不能让 XCode 在编译时查看那里。
#import <curl/curl.h>
In my target's properties I have included '/usr/include' to 'Header Search Paths'. The build continues to fail stating that it cannot find 'curl/curl.h'
在我的目标属性中,我将“/usr/include”包含在“标题搜索路径”中。构建继续失败,说明它找不到“curl/curl.h”
Am I not adding my search paths correctly?
我没有正确添加我的搜索路径吗?
Thanks
谢谢
回答by Rahul
User Header Search Paths - searched for #include "..."
and
用户标题搜索路径 - 搜索#include "..."
和
Header Search Paths for #include <...>
.
的标题搜索路径#include <...>
。
when we will provide its its frame work then it's class name then Header Search Paths need to be define. #import <framework/class.h>
当我们提供它的框架时,它是类名,然后需要定义标题搜索路径。 #import <framework/class.h>
when we directly import class name form any lib then User Header Search Paths need to be #import "class.h"
当我们直接从任何库中导入类名时,用户头搜索路径需要是 #import "class.h"