PrefixHeader. pch & #39; file not found and how to add a pch file in Xcode,

Source: Internet
Author: User

PrefixHeader. pch 'file not found and how to add a pch file in Xcode,

 

During the development process, if you have access to the old project, the error 'prefixheader. pch' file not found is reported!

 

Before Xcode6, when creating a project, the system will automatically create a pch (precompile header) file named by the project name,

During the development process, the compiler will automatically add the header files in the pch file to all the source files by including the header files that are widely used throughout the project,

In this way, you can directly use the content in the header file without using import when you need to use the relevant classes, which brings programming convenience to a great extent,

But there are also some potential problems, which is also the reason why pch is not created by default after Xcode6.

 

But sometimes the pch file is still needed. How can I add a pch file in Xcode6?

 

First, Run Command + N to open the new file window: iOS-> other-> PCH file, create a pch file, and add the header file name to be introduced:

 

 

 

Second, modify the project configuration file and add the path of the just-created PCH file to the precompile header option in building setting,

Note that both debug and release columns must be added.

 

Related Article

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.