Predefined macro for ARM in VS2011 RRS feed

  • Question

  • Hello.

    I'm writing metro app in C++ and I need to know architecture type during compiling.

    I've found list of predefined macros in VS2011: http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.110).aspx

    There are macros to detect i386 and x64 architectures. But I cannot find predefined macro to detect ARM architecture. Standard __arm__  macro doesn't work.

    Of course it is possible to add own macro for ARM detection in Project Properties (Properties->Configuration Properties->C/C++->Preprocessor->Preprocessor Deifinitions).

    But my question is the following: Is there predefined macro to detect ARM architecture in VS2011?


    Tuesday, April 3, 2012 9:17 AM


  • If you look in the Windows Kit include files you'll see that they use _ARM_, although it's not automatically defined by the compiler

    Analogous to the _M_X86 and _M_AMD64 in the list you linked there is _M_ARM.


    Wednesday, April 4, 2012 12:27 AM