Search code examples
cmacros

how to use #ifdef with an OR condition?


I would like to set OR condition in #ifdef directive.?

I tried:

#ifdef LINUX | ANDROID
...
..
#endif 

It did not work? What is the proper way?


Solution

  • Like this

    #if defined(LINUX) || defined(ANDROID)