4

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.

Jeffrey Goines
  • 935
  • 1
  • 11
  • 30

2 Answers2

6

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

Jeffrey Goines
  • 935
  • 1
  • 11
  • 30
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.

Lyubomir Vasilev
  • 3,000
  • 17
  • 24
  • yeah I actually read the article and added _WIN64 but didn't work. Here is the command line: /Od /D "_WIN64" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"x64\Debug\\" /Fd"x64\Debug\vc90.pdb" /W3 /nologo /c /Zi /TP /errorReport:prompt – Jeffrey Goines Aug 13 '12 at 06:05
  • Well, do you do a rebuild after setting that? I am not sure that VS does it automatically and I think it is required. – Lyubomir Vasilev Aug 13 '12 at 06:21