Hi there,

I wrote a simple test program:



/////////////////////////////////////////////////////////////////////////////////////////////

#include <iostream>

using namespace std;



int main()

{

#if defined(WIN32)

         cout << "WIN32" << endl;

#else

         cout << "no WIN32" << endl;

#endif

         return 0;

}


/////////////////////////////////////////////////////////////////////////////////////////////

If:

$g++ -std=c++11 test.cpp -o t

$./t

no WIN32


/////////////////////////////////////////////////////////////////////////////////////////////

If:

$g++ test.cpp -o t

$./t

WIN32


/////////////////////////////////////////////////////////////////////////////////////////////

But if replace WIN32 with _WIN32:

$g++ -std=c++11 test.cpp -o t

$./t

WIN32



So, I wonder is this a bug? Or, the macro WIN32 is deprecated?



I use this build:

http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.2/threads-posix/sjlj/i686-4.8.2-release-posix-sjlj-rt_v3-rev2.7z/download





Regards,

Leopold
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to