Any low-level macro is defined to indentify iPhone

2019-09-06 12:08发布

When compiling a vanilla iPhone project, any macro is defined to identify the platform is on iPhone OS, even when no header file is included?

TARGET_OS_MAC or TARGET_OS_IPHONE-like macros are not defined if no header is included.

So I am looking for macros defined at the similar level of __cplusplus , __GNUC__ , _MSC_VER ... etc.

标签: iphone macros
1条回答
狗以群分
2楼-- · 2019-09-06 13:02
gcc -x objective-c -E -dM /dev/null
  • -E: Run preprocessor only
  • -dM: Dump #define's.
  • -: Read from source code stdin
  • -x objective-c: Treat the source code as ObjC.
查看更多
登录 后发表回答