_WIN64 is not defined in x64 project

徘徊边缘 提交于 2019-12-12 16:19:50

问题


I'm using VS2008 and the project properties are set for (active) x64

and the weird thing is _WIN64 is not defined and WPARAM and LPARAM are still 32-bit.

Should I define _WIN64 manually?

If so, where should I put #define _WIN64? Preprocessor setting doesn't seem to work.

I'm quite certain it's compiled as x64 because in task manager the exe has no *32 postfix.


回答1:


The thing is,

_WIN64 is already defined by compiler but the IDE couldn't recognize it. (seemed fixed in VS2010.)

The values of sizeof(WPARAM) and sizeof(LPARAM) are both 8 (not 4)

The IDE shows codes in *ifdef _WIN64* block in grey color as if they were inactive, which are not.

http://bugs.python.org/issue1558




回答2:


According to Microsoft, in VS2008 you should set it yourself in the preprocessor definitions - both for debug and release builds - take a look here.



来源:https://stackoverflow.com/questions/11928583/win64-is-not-defined-in-x64-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!