Why don't you put those variables in an external file and only include the file in the compilation when you want to?
Why you would do this seems weird to me - this is asking for compiler errors about "undefined variables" etc.
I figure, including/excluding a header file with bits of code amounts to the same thing... dodgy code :-/ right? I would LIKE the source to be constant whether or not a #define flag is passed in.
The inheritance isn't the point. I could declare 3 structs and put them all IN another struct... in fact, this would probably be a preferable structure... but I would still have to macro out the struct variables in the master struct.... just as dodgy :)
Also, if your first example and your second are the same, as you indicate yourself, why would you opt for the longer and more obfuscated one?
The problem with the second is that the code with contain more bytes than its going to need. This isn't an option.
I'm not criticising, I'm too much of a beginner myself, just interested at why you are taking this route.