From: Max B. <ma...@uk...> - 2003-03-20 22:46:59
|
Sean Rima wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello mingw-users, > > I am compiling a program that requires the OS type. It seems that XP > is not coming under NT which I would have expected it to. Does anyone > know how I can work this out? > > > #if defined(__DOS__) > #define OSType "DOS" > #elif defined(__OS2__) || defined(__EMX__) > #define OSType "OS/2" > #elif defined(__NT__) > #define OSType "Win32" > #elif defined(__linux__) > #define OSType "Linux" > #endif > > g++ -c -g -Wall -pedantic -DINCS_NEED_DOT_H -DNOEXCEPTIONS ./nlmake.c > nlmake.c: In function `int main(int, char**)': > nlmake.c:177: `OSType' undeclared (first use this function) > nlmake.c:177: (Each undeclared identifier is reported only once for each > function it appears in.) gcc -E -dM nul.c (nul.c does not exist - it is the DOS NUL: device, with a .c tacked on to tell gcc what kind of file to treat it as). Max. |