预编译头名称被卡住
我是 xcode 新手,我一定错过了一些东西。
创建一个新的命令行项目。称之为 tempprog(例如)。
选择项目/编辑项目设置。
编辑前缀标头的名称 (tempprog_Prefixz.pch)。
构建 - 当然,它会失败,寻找 tempprog_Prefixz.pch
现在将前缀标头的名称更改回 tempprog_Prefix.pch。
再次构建 - 它应该可以工作,但没有。它仍在寻找 tempprog_Prefixz.pch
清理并不能纠正这种情况。我在这里缺少什么? Prefixz.pch 名称保留在哪里?如果您查看 ProcessPCH 命令的构建输出,您会发现它仍然想使用 Prefixz。
I'm new to xcode and I must be missing something.
Create a new command-line project. Call it tempprog (for instance).
Select Project/Edit Project Settings.
Edit the name of the prefix header (tempprog_Prefixz.pch).
Build - it will fail, of course, looking for tempprog_Prefixz.pch
Now change the name of the prefix header back to tempprog_Prefix.pch.
Build again - it should work, but doesn't. It's still looking for tempprog_Prefixz.pch
Cleaning does not rectify the situation. What am I missing here? Where is the Prefixz.pch name being retained? If you look in the build output at the ProcessPCH command you can see that it still wants to use Prefixz.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
事实证明,有一个确定优先级的系统。
来自使用 Xcode 构建设置:
可以设置构建设置的级别及其优先级是:
xcodebuild 命令行标志(仅适用于命令行构建)
目标,可通过目标的信息检查器进行编辑
项目,可通过项目的信息检查器进行编辑
Xcode 应用程序设置,在 Xcode > 中设置偏好设置...
Xcode 的内置默认值
用户环境,可能在用户的 ~/.MacOSX/environment.plist 文件中设置
It turns out there's a system of setting priorities.
From Working With Xcode Build Settings:
The levels at which build settings can be set, and their precedences are:
xcodebuild command-line flags (only applicable for command-line builds)
The target, editable via a target's Info inspector
The project, editable via a project's Info inspector
Xcode application settings, as set in Xcode > Preferences...
Xcode's built in defaults
The user environment, perhaps as set in a user's ~/.MacOSX/environment.plist file
重新启动 Mac 即可解决该问题。
Restarting your mac fixes the problem.