-
Doubt
In Windows if I want to set #define statements,I can give it in the preprocessor definition.
Where will I give the #define which I defined for Linux if I want to compile the linux code under Linux
for Eg:-
#ifdefine WIN32
#elif _Linux
#endif
where Should I give the "_Linux" in Linux.
Thanks..
-
It's more likely that the compiler will set something that you can use. All (or most) compilers will implicitly declare macros that you can check for in conditional compilations. Look in the help for your particular compiler (probably under "pre-defined macros" or similar).
-
The GNU compilers set __GNUC__ if you're using GNU.
Chris.