windows - Is it possible to check whether you are building for 64-bit with Microsoft C Compiler? -
is there simple preprocessor macro defined 64-bit build? thought _win64
might have been it, when build 32-bit target, parts enclosed in #ifdef _win64 ... #endif
compiled in, , causing problems. it's fri , can't think straight, i'm sure i'm overlooking simple here. maybe involving sizeof
.
i have used _win64 check if 64 bit build.
n.b. _win32 (automatically) defined msvc in 64 bit builds, check _win64 before check _win32:
#if defined( _win64 ) // windows 64 bit code here #elif defined( _win32 ) // windows 32 bit code here #else // non-windows code here #endif
c windows 64bit visual-c++
No comments:
Post a Comment