Subject: | Module doesn't compile on 64-bit Windows with VC |
The module redefines SIZE_T to DWORD before including windows.h, which
will eventually lead to DWORD being redefined by the Windows headers
because basetsd.h contains:
typedef UINT_PTR SIZE_T, *PSIZE_T;
This is benign under 32-bit but break under 64-bit where DWORD must
still be a 32-bit type. The easy fix is to get rid of the #define for
SIZE_T alltogether, just as it is already removed for GCC:
--- Win32-GuiTest/GuiTest.xs.orig 2010-10-31 12:04:41.000000000 -0700
+++ Win32-GuiTest/GuiTest.xs 2010-11-23 21:20:31.042541000 -0800
@@ -15,11 +15,6 @@
#define WIN32_LEAN_AND_MEAN
#define _WIN32_IE 0x0500
-#ifndef SIZE_T
-# ifndef __GNUC__
-# define SIZE_T DWORD
-# endif
-#endif
#include <windows.h>
#include <commctrl.h>
#include "dibsect.h"
I have no idea why the #define was there originally; the code compiles
fine without it with VC6 (32-bit mode) and the 64-bit VC++ compiler from
the Windows 2003 SP1 Platform SDK.