zoukankan      html  css  js  c++  java
  • 不同操作系统的宏定义区分

    #ifdef _WIN32
       //define something for Windows (32-bit and 64-bit, this part is common)
       #ifdef _WIN64
          //define something for Windows (64-bit only)
       #else
          //define something for Windows (32-bit only)
       #endif
    #elif __APPLE__
        #include "TargetConditionals.h"
        #if TARGET_IPHONE_SIMULATOR
             // iOS Simulator
        #elif TARGET_OS_IPHONE
            // iOS device
        #elif TARGET_OS_MAC
            // Other kinds of Mac OS
        #else
        #   error "Unknown Apple platform"
        #endif
    #elif __ANDROID__
        // android
    #elif __linux__
        // linux
    #elif __unix__ // all unices not caught above
        // Unix
    #elif defined(_POSIX_VERSION)
        // POSIX
    #else
    #   error "Unknown compiler"
    #endif
    
  • 相关阅读:
    学习笔记4
    学习笔记3
    学习笔记2
    学习笔记1
    MySQL 随笔总结
    java1-4
    java1-3
    java1-2
    java 1-1
    Mysql 基础
  • 原文地址:https://www.cnblogs.com/imagezy/p/7095847.html
Copyright © 2011-2022 走看看