#ifdef _WIN32
//windows平台
#ifdef _WIN64
//windows平台,64位
#else
//windows平台,32位
#endif
#elif __APPLE__
#if TARGET_IPHONE_SIMULATOR
// iOS Simulator
#elif TARGET_OS_IPHONE
// iOS device
#elif TARGET_OS_MAC
// Other kinds of Mac OS
#elif __ANDROID__
// android
#elif __linux__
// linux
#elif __unix__ // all unices not caught above
// Unix
#elif defined(_POSIX_VERSION)
// POSIX
#else
# error "Unknown"
#endif
多平台判断方法,c/c++使用宏
最新推荐文章于 2024-07-17 20:58:27 发布