Add PCH file in Xcode6

Source: Internet
Author: User

1. pch File:

PCH means "precompiled header", called Precompiled header file, Xcode6 after the PCH file needs to be added manually, PCH file generally put some basic unchanged code, such as some macro definitions so that the entire project can be used or some framework of the header files.

PCH file is designed to improve the efficiency of compilation, a file is modified in Xcode, and any file containing the file needs to be recompiled. If the PCH file is modified, all the files contained by the PCH will be recompiled, which can consume a lot of time.

A PCH file defines the macro definition and the header file:

Steps to add PCH files under 2.xcode6:

(1) Add new file Select PCH file

(2) Naming the PCH file

(3) After clicking Create, you can see your PCH file in the file list on the left.

(4) Set in Build setting

    

(5) Set the prefix header's debug and release to the path of the PCH you just created

e.g. $ (srcroot)/name of the current project/pch filename. pch

$ (srcroot) represents the path to the current project file

(6) Re-compile the project, you can use the

Add PCH file in Xcode6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.