开发者

What to use for iOS compiler define

I have the following code that I want to run on Iphone OS, what compiler flag should I use for IOS and where in the below code should it be inserted? Thanks

  #if defined(__BORLANDC__) || defined (__WATCOMC__) || defined(_MSC_VER) ||                 defined(__ZTC__) || defined(__HIGHC__) || defined(_TURBOC_)
 typedef  long  int   Word32   ;
 typedef  short int   Word16   ;
 typedef  short int   Flag  ;
 #elif defined( __sun)
 typedef short  Word16;
 typedef long  Word32;
 typedef int   Flag;
 #elif defined(__unix__) || defined(__unix)
 typedef short Word16开发者_高级运维;
 typedef int   Word32;
 typedef int   Flag;
 #elif defined(VMS) || defined(__VMS) 
 typedef short  Word16;
 typedef long  Word32;
 typedef int   Flag;
 #else
 #error  COMPILER NOT TESTED typedef.h needs to be updated, see readme
 #endif


For iOS/tvOS/watchOS, you can use:

#if (TARGET_OS_IPHONE)

For iOS, you can use:

#if (TARGET_OS_IOS)

and for MAC OS X:

#if (TARGET_OS_OSX)

Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜