I would like to do something similar to #ifdef __linux__
, but with the bada SDK. Is there a constant defined by default?
Also, can I detect wh开发者_JAVA百科en I am compiling for the simulator?
You can, by checking the MingW Compiler's keyword, here's an interesting link that would point you in the right spot... so in theory you could have it this way
#ifdef __MINGW32__ /* we're in the simulator target */ #else /* we're in the native target */ #endif
I use something like :
#ifdef SHP
# define CONFIG_SUPPORT_API_Osp 1 // bada
#endif
I wish there is also a define that tell sdk version or target api too ..
Use :
#ifdef _DEBUG
// Your code
#endif
精彩评论