Xcode 6.1 Precompiled Headers

坚强是说给别人听的谎言 提交于 2019-12-21 08:00:06

问题


In Xcode 6.1, creating a new project does not create a precompiled header file using the single view iOS project template. If I add one manually, any definitions in the pch file are not available in any other source files.

I've looked at many threads and questions and tried cleaning, re-buiding, re-starting, deleting derived data and manually removing the CACHE_ROOT/SharedPrecompileHeaders folder. All to no avail, though.

Some info suggests ticking to include in targets, but this is disabled for pch and other header files now.

See comment below.


回答1:


Have you tried adding the path of the pch file?

Go to your project -> Build Settings -> Apple LLVM 6.0 Language.

Under it, set the following things:

  • Precompile Prefix Header: Set it to YES
  • Prefix Header: Set the path to the pch file

Update 2018/09/23: In Xcode10 it is under Apple Clang - Language



来源:https://stackoverflow.com/questions/26822953/xcode-6-1-precompiled-headers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!