Hi Leopold! On Wed, Jan 15, 2014 at 8:25 PM, Leopold Freeman <> wrote: > 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 > > ...
I see the same result as you. But if I compile with "-std=gnu++11", I get "WIN32". I believe that not specifying "-std" is equivalent to "-std=gnu++03", which means the 03 standard plus "gnu extensions." I get: (no -std) WIN32 -std=c++03 no WIN32 -std=gnu++03 WIN32 -std=c++11 no WIN32 -std=gnu++11 WIN32 So it looks to me as if having WIN32 defined is considered to be a "gnu extension." (Why, I don't know.) And that the WIN32 issue does not seemed to be linked specifically with the c++11 standard. > ... > > 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 I used: C:\>g++ --version g++ (rubenvb-4.8-stdthread) 4.8.1 20130324 (prerelease) > Regards, > > Leopold Happy Hacking! K. Frank ------------------------------------------------------------------------------ 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