like is there a:
#ifdef WINDOWS
// do stuff
#else
// linux stuff
#endif
??
like is there a:
#ifdef WINDOWS
// do stuff
#else
// linux stuff
#endif
??
It depends on what files are you using.
The compiler itself doesn't have such a flag, but it is common to have such a define in the operating system's SDK.
For example, the CRT has a Win32 define, which affects how it is compiled.
The _WIN32 is always defined on Windows platform, checkout the predefined macros.
I'm not entirely sure I understand the question but yes, you can do this. Obviously, you need to tell the compiler you're compiling on Windows (or operating system x) at compile time. I've seen a similar approach used for bit size of things like integers.
This is the most complete table I know of. http://predef.sourceforge.net/precomp.html