< AppName> .pch文件用法 [英] <AppName>.pch file usage

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

问题描述

.pch文件的重要性是什么?#ifdef OBJC 的意义是什么?

What is the importance of .pch file and what is the significance of"#ifdef OBJC"?

定义参数,例如在.pch文件中检查的#ifdef IS_PRODUCTION。

Also, where do we define parameters like "#ifdef IS_PRODUCTION" which are checked in .pch file.

推荐答案

.pch 是一个预编译头。


在C和C ++编程语言中,头文件是一个文件文本可以由C预处理器自动包括在另一个源文件中,通常由在源文件中使用编译器指令指定。

In the C and C++ programming languages, a header file is a file whose text may be automatically included in another source file by the C preprocessor, usually specified by the use of compiler directives in the source file.

#ifdef OBJC 让编译器知道代码是Objective-C。

#ifdef OBJC lets the compiler know that the code is Objective-C.

#ifdef IS_PRODUCTION 是您自己定义的,一个指令告诉编译器只有在定义时才做某事,最有可能的事情用于PRODUCTION构建。

#ifdef IS_PRODUCTION is something you have defined on your own, a directive telling the compiler to do something only if this is defined, most-likely something for a PRODUCTION build.

这篇关于< AppName> .pch文件用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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