views:

55

answers:

2

how do i write the following in the preprocessor directive language?

if (isfullversion and isproduction)

else if (isliteversion)

end if
+1  A: 

You create separate targets. one for the lite version, one for the full version, then add compiler flags like -DLITE then check #ifdef LITE in your code.

jer
I've already done that. What I don't know is how to write the #ifdef part for the above conditions
Melina
You need to place that around the sections of code that you want for just the lite version, or just the full version, depending on the preprocessor define. You need only define one (whichever one makes sense for your purpose) as the !THAT_THING will be the other. I.e., if you define `LITE` then `#ifndef LITE` will be full.
jer
A: 

You should be able to write the conditions you already have for the preprocessor if you want, rather than just checking if they are defined.

#if (isfullversion && isproduction)

#elif (isliteversion)

#endif
Stew