English 中文(简体)
将系统头盔搜索路径改为Xcode
原标题:Adding system header search path to Xcode

(为参考目的提出这一问题,立即回答)

How to add header search paths to Xcode? Especially when including with this syntax:

include <myheader.h>
  1. Adding path globally to all projects like system headers.
  2. Adding path to only to a specific project.
最佳回答

我们有两个选择。

  1. 在X条码中,见P参比和;Locations->“Custom Paths”。 如果你用这个名称拯救了习俗道路,那么,在项目环境中,你可以添加“Header搜索路径”作为“ppheaders”。

  2. Set HEADER_SEARCH_PATHS parafalls inbuilding context on Project info. 我在此处添加了<代码>${SRCROOT}>,未作改动。 对大多数项目来说,这一环境运转良好。

第2项选择:

Xcode uses Clang which has GCC compatible command set. GCC has an option -Idir which adds system header searching paths. And this option is accessible via HEADER_SEARCH_PATHS in Xcode project build setting.

然而,在这种环境中铺设的道路不应含有任何白天空间特征,因为这一选择将像现在一样被压倒。

但是,一些SOS X用户(如我)可能将其项目放在包括白天空在内的道路上,而白天可以绕过<>。 如果你以人工方式投入,你可以躲避<代码>/Users/my/work/a项目。 您还可以以“使用<代码>等环境变量”取代“

或仅使用<代码>。 我在Webkit的源代码上看到了这一陷阱,但我确信,目前的目录在建造时将放在项目目录上。

缩略语 这意味着来源目录。 可在找到更多的价值观。 参考文件

PS。 实际上,您不必使用<条码>{>>>>>。 我在<代码>上取得了相同结果。 如果你知道这一差异,请让我知道。

问题回答

对Eonil项目一级环境的答复采取后续行动。 由于选定了目标,并选定了“建筑环境”,因此可能没有在“搜索航道”下列名。 在这种情况下,你可以将搜索通道的“基本”改为“一切”。

只是为了完整起见。

<代码>/Users/my/work/a Project withspace”/**

如果没有回馈,删除<代码>**

Though this question has an answer, I resolved it differently when I had the same issue. I had this issue when I copied folders with the option Create Folder references; then the above solution of adding the folder to the build_path worked. But when the folder was added using the Create groups for any added folder option, the headers were picked up automatically.





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签