.px文件在Xcode 6.1中 [英] .pch File in Xcode 6.1

查看:145
本文介绍了.px文件在Xcode 6.1中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个问题涉及将一个头文件添加到xcode 6.1项目中。我想要做的是添加一个头文件,该文件会自动导入到我创建的每个文件中。





我创建了啊& am



其中包含了PriorMade.pch或previouslyMade.h定义。



设置,并且没有更新.pch文件的选项。



是否有解决方案或者我每次创建时都需要导入.h文件一个新的文件?



谢谢

解决方案


  1. 您需要创建一个名为 ProjectName-Prefix.pch 的PCH文件。在新文件对话框中,您会在其他位置找到PCH。

  2. 转到项目>构建设置并搜索Prefix Header。在Apple LLVM 6.0 - 语言下添加您的PCH文件: ProjectName / ProjectName-Prefix.pch 注意:确保选择'All'而不是'Basic'

  3. 现在添加您希望在您的PCH文件中全部包含的任何标题

  4. 清理并重建您的项目。


I have looked all over and cannot find a solution to this problem.

The problem involves adding a header file to an xcode 6.1 project. What I want to be able to do is add a header file that is automatically imported to each of the files I create.

i.e.

I create a.h & a.m.

Where previouslyMade.pch or previouslyMade.h definitions are already included.

I've looked through build settings and there isn't an option to update the .pch file.

Is there a solution to this or have I got to import a .h file every time I make a new file?

Thanks

解决方案

  1. You'll need to create a PCH file named ProjectName-Prefix.pch. In the new file dialog you'll find PCH under Other.
  2. Go to Project > Build Settings and search "Prefix Header". Under "Apple LLVM 6.0 - Language" add your PCH file: ProjectName/ProjectName-Prefix.pch note: make sure you select 'All' not 'Basic'
  3. Now add any headers you want globally included in your PCH file
  4. Clean and rebuild your project.

这篇关于.px文件在Xcode 6.1中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆