views:

46

answers:

3

Hi, 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 when I am compiling for the simulator?

A: 

Use :

#ifdef _DEBUG
    // Your code
#endif
Alex
+1  A: 

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
tommieb75
+1  A: 

I use something like :

#ifdef SHP
# define CONFIG_SUPPORT_API_Osp 1 // bada
#endif
rzr