tuli
8th January 2013, 22:04
Hello,
VS provides macros which can be used by the preprocessor to def/undef parts of the source.
particulary:
_DEBUG - defined in debug builds
_M_IX86 - defined when builidng for x86
_M_X64 - defined when building for x64 (also: _WIN64)
#ifdef _WIN64
str = "windows 64";
#else
str = "windows 32";
#endif
Does Qt provide standardized macros for this?
Right now i am building for windows x86/x64 in visual studio and i heavily use above macros (esp. _WIN64).
Now a Linux/osx port starts to show up on the horizon and i start worrying... ;)
VS provides macros which can be used by the preprocessor to def/undef parts of the source.
particulary:
_DEBUG - defined in debug builds
_M_IX86 - defined when builidng for x86
_M_X64 - defined when building for x64 (also: _WIN64)
#ifdef _WIN64
str = "windows 64";
#else
str = "windows 32";
#endif
Does Qt provide standardized macros for this?
Right now i am building for windows x86/x64 in visual studio and i heavily use above macros (esp. _WIN64).
Now a Linux/osx port starts to show up on the horizon and i start worrying... ;)