2012-03-11 85 views

回答

3

當然;在GCC中:

#ifdef __APPLE__ 
    #include "TargetConditionals.h" 

    #ifdef TARGET_OS_IPHONE 
    // targeting the iPhone 
    #elif TARGET_IPHONE_SIMULATOR 
    // targeting the iOS simulator 
    #elif TARGET_OS_MAC 
    // targeting the Mac OS 
    #else 
    // unknown target platform 
    #endif 
#else 
    // non-Apple platform 
#endif 
相關問題