开发者

importance of <ApplicationName>_prefix.pch file

What is the importance of impo开发者_运维百科rtance of _prefix.pch file?


Conceptually, it's included at the top of every translation unit (i.e. every compiled C, C++, Objective-C, or Objective-C++ file.) So you can force every file in your project to include a particular macro by adding this to your .pch file:

#if !defined(MY_MACRO)
    #define MY_MACRO (12345)
#endif /* !defined(MY_MACRO) */

And then MY_MACRO is always available. It's also commonly used to import framework headers so you don't have to run around typing #import <Foundation/Foundation.h> in every file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜