I need my code to do different things based on the operating system on which it gets compiled. I\'m looking for something like this:
#ifdef OSisWindows
// do
I think you are looking for:
_WIN32- Defined as 1 when the compilation target is 32-bit ARM, 64-bit ARM, x86, or x64. Otherwise, undefined_WIN64- Defined as 1 when the compilation target is 64-bit ARM or x64. Otherwise, undefined.
I think you are looking for:
__GNUC____GNUC_MINOR____GNUC_PATCHLEVEL__
Do a google for your appropriate compilers pre-defined.