在x64项目中未定义_WIN64 [英] _WIN64 is not defined in x64 project
问题描述
我正在使用VS2008,并且将项目属性设置为(活动)x64
I'm using VS2008 and the project properties are set for (active) x64
奇怪的是未定义_WIN64且WPARAM和LPARAM仍为32位。
and the weird thing is _WIN64 is not defined and WPARAM and LPARAM are still 32-bit.
我应该手动定义_WIN64吗?
Should I define _WIN64 manually?
如果是这样,我应该在哪里#define _WIN64?
If so, where should I put #define _WIN64? Preprocessor setting doesn't seem to work.
我很确定它被编译为x64,因为在任务管理器中该exe没有* 32后缀。
I'm quite certain it's compiled as x64 because in task manager the exe has no *32 postfix.
推荐答案
问题是,
_WIN64已经由编译器定义,但IDE无法认不出来。 (似乎已在VS2010中修复。)
_WIN64 is already defined by compiler but the IDE couldn't recognize it. (seemed fixed in VS2010.)
sizeof(WPARAM)和sizeof(LPARAM)的值均为8(而不是4)
The values of sizeof(WPARAM) and sizeof(LPARAM) are both 8 (not 4)
IDE在* ifdef _WIN64 *块中以灰色显示代码,就好像它们处于非活动状态一样。
The IDE shows codes in *ifdef _WIN64* block in grey color as if they were inactive, which are not.
http://bugs.python.org/issue1558
这篇关于在x64项目中未定义_WIN64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!