Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:41:12+00:00 2026-06-10T07:41:12+00:00

Visual Studio Compilers(2005 through 2008) defines four macros for x86/x64 bit environment. Refer Predefined

  • 0

Visual Studio Compilers(2005 through 2008) defines four macros for x86/x64 bit environment. Refer Predefined Macros

  • _M_X64 Defined for x64 processors.
  • _M_IX86 Defined for x86 processors. See the Values for _M_IX86 table below for more information. This is not defined for x64 processors.
  • _WIN32 Defined for applications for Win32 and Win64. Always defined.
  • _WIN64 Defined for applications for Win64.

Now on a x32 bit machine _M_X64 would never be set. On a 64 bit machine, if you are building on a 32 bit environment _M_X64 would be unset and _M_IX86 would be defined. _WIN32 is always defined irrespective of a 32/64 bit build.

Across all x64 processors, is there special significance of _M_X64? Can there be a scenario when _M_X64 is undefined when target is x64?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:41:14+00:00Added an answer on June 10, 2026 at 7:41 am

    Now on a x32 bit machine _M_X64 would never be set

    That’s not how it works. The compiler you use generates code for a specific target architecture, it doesn’t care about your machine. Generating x64 code on a 32-bit machine is very possible, MSVC includes a cross compiler that can run on a 32-bit operating system and generate code for x64. And it has a 64-bit compiler that generates x64 code. The IDE is setup to actually use the cross-compiler, regardless of your OS.

    You can see these compilers installed on your machine, the vc\bin subdirectory of the VS install directory. That directory contains a 32-bit compiler that generates x86 code. The x86_amd64 subdirectory has a 32-bit compiler that generates x64 code. The amd64 subdirectory has a 64-bit compiler that generates x64 code. Additional directories may exist there if you have compilers for ARM cores. Which are always cross-compilers.

    The macro names you ask about are predefined macros, the full list is here. The _M_X64 macro is always defined by any of the compilers that generate x64 code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on some C code in Visual Studio 2005 on Win7 Pro x64.
The Build tab of the Project Properties in Visual Studio 2005/2008 contains the Optimize
Visual Studio (2005/2008/2010) appears to create a response file containing flags for the C/C++
Visual Studio 2003 and 2005 (and perhaps 2008 for all I know) require the
I came across the following code that compiles fine (using Visual Studio 2005): SomeObject
Visual Studio 2008 I am using the following source code that compiles ok using
the following code compiles with Visual Studio 2008 but not with g++ on Mac
I was trying to compile our project in Visual Studio 2010 using the 2005
The following code works on Visual Studio 2005, but gives me a compiler error
I've converted a Visual Studio 2005 Website Project into a Web Application Project by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.