问题
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