_WIN64 未在 x64 项目中定义 [英] _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
这篇关于_WIN64 未在 x64 项目中定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!