Visual Studio 2010 中是否有针对 64 位的 #define? [英] Is there a #define for 64 bit in Visual Studio 2010?
本文介绍了Visual Studio 2010 中是否有针对 64 位的 #define?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有 #define 指示 Visual Studio 是否在 64 位模式下编译?我希望能够像这样有条件地包含一些代码
#ifdef _IS_64BIT...#else//32位...#万一
我知道我可以自己创建一个标志,但我想知道编译器是否提供了一个标志.
解决方案
#ifdef _WIN64...#别的...#万一
记录在 MSDN>
Is there a #define that indicates whether Visual Studio is compiling in 64bit mode? I'd like to be able to include some code conditionally like so
#ifdef _IS_64BIT
...
#else //32 bit
...
#endif
I know I can create a flag myself, but I'm wondering if the compiler provides one.
解决方案
#ifdef _WIN64
...
#else
...
#endif
Documented on MSDN
这篇关于Visual Studio 2010 中是否有针对 64 位的 #define?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文