I would like to have a global way to do something like this
#ifdef GRAPHICS
//do some stuff that relies on graphics libraries that may or may not be installed
#endif
The problem with defines is that they have to be defined in every file, or at least be defined in a header that is included in every file that I wish to do this.
What I'm looking for is more of maybe a compiler option or something? Where I can say
g++ MyProgram +GRAPHICS
or
g++ MyProgram -GRAPHICS
And it will just ignore parts of the code completely if GRAPHICS is not specified.
Sorry if this is unclear, but I'll explain as we go! haha
Thanks,
Dave