From: Leopold F. <leo...@gm...> - 2014-01-16 01:25:52
|
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 |