如何在 Xcode 中设置特定的预编译头文件?

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

How to set a specific precompiled header file in Xcode?

xcodexcode4

提问by syvex

Is there a way to set a non-default precompiled header file in Xcode? For example, instead of Project_Prefix.pch being the precompiled header, could I set it to SomeOtherHeader.h?

有没有办法在 Xcode 中设置一个非默认的预编译头文件?例如,我可以将 Project_Prefix.pch 设置为 SomeOtherHeader.h,而不是作为预编译头文件?

回答by Giuseppe Mosca

Select the target, select Build Settings, search for Prefix Header and change the setting

选择目标,选择 Build Settings,搜索 Prefix Header 并更改设置

回答by jeppeb

In XCode 6.1 it's under Build Settings > Apple LLVM 6.0 - Language

在 XCode 6.1 中,它位于 Build Settings > Apple LLVM 6.0 - Language