Subject: | Will not build in x64 |
First and foremost, thanks for the hard work on a very helpful module!
We are wanting to use this module on the Vista and Windows 64 bit
platform and encountered some problems...
Win32::GuiTest does not build under Strawberry perl 5.12.0.1 x64 on
Vista or Windows 7 64-bit.
You can use the developer version of Win32::API (v0.60_64) to allow
Win32::API to build, test, and install in the x64 environment.
The attached patch allows Win32::GuiTest to build, test, and install
using Strwaberry perl v5.10.1.1 in Windows 7 (32-bit) and Strawberry
perl v5.12.0.1 on Wista and Windows 7 (64-bit).
If the SIZE_T definition is present, then this produces a conflicting
declaration. Eliminating the define corrected the problem in x64, and
did not create a problem in x86.
At lines 694 and 695, casting the parameters to LONG generates an error
in x64 "cast from 'void*' to 'LONG' loses precisions.
Changing these to UV instead of LONG works in both x64 and x86 builds.
If you need more details, or would like me to test an alternate patch,
please let me know.
Thanks,
Paul
Subject: | Win32-GuiTest-1.57-x64.patch |
--- GuiTest.xs
+++ patched/GuiTest.xs 2010-07-29 14:14:17.157312500 -0500
@@ -15,9 +15,6 @@
#define WIN32_LEAN_AND_MEAN
#define _WIN32_IE 0x0500
-#ifndef SIZE_T
-# define SIZE_T DWORD
-#endif
#include <windows.h>
#include <commctrl.h>
#include "dibsect.h"
@@ -691,8 +688,8 @@
die( "VirtualAllocEx failed with error %d: %s",
dw, lpMsgBuf );
}else{
- XPUSHs( sv_2mortal( newSVuv( ( LONG )pBuffer ) ) );
- XPUSHs( sv_2mortal( newSVuv( ( LONG )hProcess ) ) );
+ XPUSHs( sv_2mortal( newSVuv( ( UV )pBuffer ) ) );
+ XPUSHs( sv_2mortal( newSVuv( ( UV )hProcess ) ) );
}