我重新使用传统的C库在iOS应用和Android应用程序。我想自定义一些宏定义(如日志记录)。有没有标准的定义检查(使用的#ifdef)的code是否被编译为iOS或Android / NDK?
I am reusing a legacy C library in an iOS app and in an Android app. I want to customize some macro definitions (e.g. for logging). Are there standard defines to check for (using #ifdef) whether the code is being compiled for iOS or Android/NDK?
__ ANDROID __
或机器人
为Android(编译与NDK)
和 __ __苹果
苹果平台(iOS和OSX)
__ANDROID__
or ANDROID
for Android (compilation with the NDK)
and __APPLE__
on Apple platforms (iOS or OSX)
上一篇:缓存目录不存在不存在、缓存、目录
下一篇:安卓立即自动完成自动完成、卓立