Which Cross Platform Preprocessor Defines? (__WIN32__ or __WIN32 or WIN32 )?

Posted by brubelsabs on Stack Overflow See other posts from Stack Overflow or by brubelsabs
Published on 2010-06-07T13:16:15Z Indexed on 2010/06/07 13:32 UTC
Read the original article Hit count: 212

I often see __WIN32, WIN32 or __WIN32__. I assume that this depends on the used preprocessor (either one from visual studio, or gcc etc).

Do I now have to check first for os and then for the used compiler? We are using here G++ 4.4.x, Visual Studio 2008 and Xcode (which I assume is a gcc again) and ATM we are using just __WIN32__, __APPLE__ and __LINUX__.

© Stack Overflow or respective owner

Related posts about c++

Related posts about macro