开发者

Any low-level macro is defined to indentify iPhone OS w/o include any Apple header?

开发者 https://www.devze.com 2022-12-26 21:03 出处:网络
When compiling a va开发者_如何转开发nilla iPhone project, any macro is defined to identify the platform is on iPhone OS, even when no header file is included?

When compiling a va开发者_如何转开发nilla 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.


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.
0

精彩评论

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

关注公众号