To add a global PCH file to a project

Source: Internet
Author: User

Note that this blog post is only convenient for later in the Add PCH file configuration when the reference to use, worried about some of the configuration of the path due to time and forgotten.

(1) Build a PCH file

Note that the following should be Targets after the

(2) Some configuration of the file

Select the project project file, as shown in the following:

(3) Handling of common errors

Most of the introduction of the path, write exactly as above, but after compiling or will error, this time again to open the path we wrote, we will find that the path is a duplicate reference, when the duplicate references are deleted, again compile on OK.

In addition, if it is a system file, we introduced in the PCH file, note to use <> can not use "", if it is the class we write, when we introduce, do not use <> to use "", such as the correct introduction of the Foundation framework, the correct wording is #im Port<foundation/foundation.h> error: #import "Foundation/foundation.h" or #import "Foundation.h"

To add a global PCH file to a project

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.