You are all right. The _AMD64_ is not set by default in Visual Studio. You will need to define it yourself if you want to use it:
#if defined _M_X64 || defined _M_AMD64 #define _AMD64_ #endif
But you do not make up the memory of its existence. The Windows DDK comes with makefiles that define this character, in addition to some others. Check makefile.def . The following options are possible:
_X86_
Differently known as x86, i386 and IA-32
(this is the same as VS predefined _M_IX86 )
_AMD64_
Known as AMD64, x64, x86-64, IA-32e, and Intel 64
(this is the same as VS predefined _M_X64 and _M_AMD64 )
_IA64_
Intel Itanium (IA-64)
(this is the same as the predefined VS _M_IA64 )
& hellip; and some others for architectures that no one else targets
Ideally, you should configure the build system to predefine a set of well-known macros that will then be used in your own code. If you don't have a build system, at least install something in a precompiled header file. Thus, you do not rely on implementation-specific characters, and switching compilers is not a colossal chorus - the symbols of the target architecture, predefined by GCC, are very different from MSVC, for example.
source share