xcode 在哪里解析“$(BUILT_PRODUCTS_DIR) 到我的系统?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10847074/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:27:55  来源:igfitidea点击:

Where does xcode resolve "$(BUILT_PRODUCTS_DIR) to on my system?

xcodebuild

提问by Undistraction

When Compiling for iPhone Simulator with Xcode 4.2, if I place

使用 Xcode 4.2 为 iPhone Simulator 编译时,如果我放置

"$(BUILT_PRODUCTS_DIR)"

"$(BUILT_PRODUCTS_DIR)"

in

Build Settings / Header search paths / Debug

构建设置/标题搜索路径/调试

and exit editing I can see it resolves to:

并退出编辑我可以看到它解析为:

"build/Debug-iphoneos"

“构建/调试-iphoneos”

Where should this be on my system? I have looked in:

这应该在我的系统上的什么地方?我查看了:

Library/Developer/Xcode/DerivedData/{Project Name}/Build

but I can't find a file called build that contains a folder called Debug-iphoneos.

但我找不到一个名为 build 的文件,其中包含一个名为 Debug-iphoneos 的文件夹。

采纳答案by trojanfoe

On my system, compiling an OSX project, that resolves to an absolute path:

在我的系统上,编译一个解析为绝对路径的 OSX 项目:

BUILT_PRODUCTS_DIR /Users/andy/Source/MyProject/build/Debug

There are so many Xcode build variables that I keep a text file with a sample list of them which I got from executing a custom build script and viewing the output within the log tab.

有太多的 Xcode 构建变量,我保留了一个文本文件,其中包含我从执行自定义构建脚本并查看日志选项卡中的输出中获得的示例列表。

If your code is going into the Libraryfolder, then that is hidden under Lion. You can unhide it from the command line (Terminal) using:

如果您的代码进入该Library文件夹,则它隐藏在 Lion 下。您可以Terminal使用以下命令从命令行 ( )取消隐藏它:

$ cd ~
$ chflags nohidden Library

You should then be able to see its content.

然后您应该能够看到它的内容。

Another tip: I have a ~/tmpfolder where I let temporary stuff accumulate and I have set my Xcode preferences to put DerivedDataand Archivesinto that folder so I can:

另一个提示:我有一个~/tmp文件夹,我可以在其中积累临时内容,并且我已将 Xcode 首选项设置为放入DerivedDataArchives放入该文件夹中,因此我可以:

  • delete it now and again (I don't like temporary stuff accumulating where I cannot control it).
  • see it for packaging pre-release Archived project to testers.
  • 一次又一次地删除它(我不喜欢在我无法控制的地方积累临时的东西)。
  • 请参阅它以将预发布存档项目打包给测试人员。