-
October 4th, 2012, 12:37 AM
#1
Where is _M_X64 in the 64-bit project?
The code snippet shows different compilations on 3 platforms with different preprocessors/macros.
#if defined _M_IX86
cout << _T(" (x86)");
#elif defined _M_X64
cout << _T(" (x64)");
#elif defined _M_IA64
cout << _T(" (Itanium)");
#endif
Now I am porting a Win32 project to 64-bit Windows. In the 64-bit project, I don't find where is _M_X64, i.e. no such statement as "#define _M_X64" in the header or source files, I open the project property, and don't find _M_X64 preprocessor/macro defined in the the linker or c++ tabs. by the way I run visual studio 2008 on 32-bit windows XP.
Should I manually add the statement "#define _M_X64" into the project? (However, according to MSDN, this macro cannot be redefined. http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx ).
Or is there any other ways I don't know and should follow? Thanks for help!
-
October 4th, 2012, 01:46 AM
#2
Re: Where is _M_X64 in the 64-bit project?
No, it's defined by the compiler when you select x64 as your target platform (from the project property).
-
October 4th, 2012, 03:13 AM
#3
Re: Where is _M_X64 in the 64-bit project?
Thank you cilu!
I select x64 as the target platform, and open the project property, but there is no _M_X64 defined in both the Linker and c\c++ tabs.
Is it because the computer I use now is a 32-bit machine? Is _M_X64 only visible on 64-bit machines and invisible on 32-bit machine?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|