Click to See Complete Forum and Search --> : Doubt


Kohinoor24
August 1st, 2002, 06:40 AM
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..

Graham
August 1st, 2002, 07:35 AM
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).

dude_1967
August 1st, 2002, 08:26 AM
The GNU compilers set __GNUC__ if you're using GNU.
Chris.