From: Dill, John <john-dill@ui...> - 2004-05-18 14:04:24
> From: Peter Barada <peter@...>
> To: mingw-users@...
> Subject: Re: [Mingw-users] preprocessor comparison
> Date: Mon, 17 May 2004 15:50:41 -0400 (EDT)
> Reply-To: mingw-users@...
> >The behavior I get is that the linux file is always included, and the
> >mingw never gets included. I could possible move it to the=20
> top of the
> >list, but wonder if I'm missing something. Has anyone else=20
> seen this?=20
> >I have the current release version of the software, the gcc=20
> 3.2.3 version.
> Try looking at the output from the preprocessor (-E -dD) and see where
> PLATFORM is defined. It could be that it is defined by the
> commandline, but them redefined somewhere else.
I find that there is a #define PLATFORM mingw in the output, but it =
still does not resolve when I compile it.
Try this sample.
int main( int argc, char **argv )
#if (PLATFORM =3D=3D linux)
std::cout << "Linux..." << std::endl;
#elif (PLATFORM =3D=3D mingw)
std::cout << "MinGW..." << std::endl;
std::cout << "Unknown..." << std::endl;
Now try compiling with -DPLATFORM=3Dmingw and check the result. Do you =
get linux or mingw?