不同操作系统的宏定义区分
生活随笔
收集整理的這篇文章主要介紹了
不同操作系统的宏定义区分
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
轉載自?不同操作系統的宏定義區分
#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?
轉載于:https://www.cnblogs.com/tlz888/p/11357612.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的不同操作系统的宏定义区分的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 分布式数据库技术基础:数据分布介绍
- 下一篇: 分布式数据库管理系统介绍