Hoping to get access to a 64 bit machine with a working compiler soon...
------- Forwarded message ------- From: "Bob R" To: cos...@cpan.org Subject: Win32 API module Date: Thu, 17 Mar 2011 05:48:21 +1100 Hi, I’m a relative beginner at c/c++ but I’ve been scripting in Perl for many years. I’ve wanted to get the API module installed on my computer for quite a while now and only recently found myself proficient enough to figure out what was happening with the XS files. Unfortunately I have to use a Windoze computer so I’m stuck with what I have. I now am running a 64 bit processor on a Windows 7 OS and I’m aware that the API module was written for 32 bit applications. In talking to people from Perl and Active State I was referred to the newer Strawberry Perl and I’ve installed that and it seems to work fine. But it looks like the API module and one other I like (the Par Packer) are still only available to 32 bit machines. You asked for feedback and I don’t know if this is worth anything to you since I’m sure you’re already aware of it’s uses, but here are the error messages I get from running dmake and dmake test. Please keep me informed if you ever get a 64 bit API module written and thanks for all your efforts! Bob: D:\MyPerl\Perl\Programs\XS\Temp\Win32-API-0.59>dmake cp Type.pm blib\lib\Win32/API/Type.pm cp Callback.pm blib\lib\Win32/API/Callback.pm cp Test.pm blib\lib\Win32/API/Test.pm cp Struct.pm blib\lib\Win32/API/Struct.pm cp API.pm blib\lib\Win32/API.pm C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap Callback.xs > Callback.xsc && C:\straw berry\perl\bin\perl.exe -MExtUtils::Command -e "mv" -- Callback.xsc Callback.c gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DUSE_SI TECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mm s-bitfields -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.59\" -DXS_VER SION=\"0.59\" "-IC:\strawberry\perl\lib\CORE" Callback.c Callback.xs: In function 'CallbackMakeStruct': Callback.xs:250: warning: cast from pointer to integer of different size Callback.xs: In function 'CallbackTemplate': Callback.xs:305: warning: cast to pointer from integer of different size Callback.xs:313: warning: cast to pointer from integer of different size Callback.xs: In function 'CallbackCreate': Callback.xs:581: warning: cast from pointer to integer of different size Callback.xs:596: warning: cast from pointer to integer of different size Callback.xs:597: warning: cast from pointer to integer of different size Callback.xs:637: warning: cast from pointer to integer of different size Callback.xs:687: warning: cast from pointer to integer of different size Callback.xs:738: warning: cast from pointer to integer of different size Callback.xs: In function 'XS_Win32__API__Callback_CallbackCreate': Callback.xs:868: warning: cast from pointer to integer of different size Callback.xs: In function 'XS_Win32__API__Callback_PushSelf': Callback.xs:896: warning: cast from pointer to integer of different size Running Mkbootstrap for Win32::API::Callback () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Callback.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Win32::API::Callback\", 'DLBASE' => 'Callback', 'D L_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" dlltool --def Callback.def --output-exp dll.exp g++ -o ..\blib\arch\auto\Win32\API\Callback\Callback.dll -Wl,--base-file -Wl,dll .base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Callback. o -Wl,--image-base,0x21000000 C:\strawberry\perl\lib\CORE\libperl512.a -lmoldna me -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole3 2 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbcc p32 -lcomctl32 dll.exp dlltool --def Callback.def --base-file dll.base --output-exp dll.exp g++ -o ..\blib\arch\auto\Win32\API\Callback\Callback.dll -mdll -s -L"C:\strawber ry\perl\lib\CORE" -L"C:\strawberry\c\lib" Callback.o -Wl,--image-base,0x21000000 C:\strawberry\perl\lib\CORE\libperl512.a -lmoldname -lkernel32 -luser32 -lgdi3 2 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luui d -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 ..\blib\ar ch\auto\Win32\API\Callback\Callback.dll C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "cp" -- Callback.bs ..\bl ib\arch\auto\Win32\API\Callback\Callback.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 ..\blib\ar ch\auto\Win32\API\Callback\Callback.bs C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap API.xs > API.xsc && C :\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "mv" -- API.xsc API.c gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DUSE_SI TECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mm s-bitfields -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.59\" -DXS_VER SION=\"0.59\" "-IC:\strawberry\perl\lib\CORE" API.c API.xs: In function 'XS_Win32__API_GetProcAddress': API.xs:127: warning: cast from pointer to integer of different size API.xs: In function 'XS_Win32__API_PointerTo': API.xs:206: warning: cast from pointer to integer of different size API.xs: In function 'XS_Win32__API_ReadMemory': API.xs:223: warning: cast to pointer from integer of different size C:\Users\Robert\AppData\Local\Temp\cctSt5Bt.s: Assembler messages: C:\Users\Robert\AppData\Local\Temp\cctSt5Bt.s:3129: Error: suffix or operands in valid for `push' C:\Users\Robert\AppData\Local\Temp\cctSt5Bt.s:3132: Error: suffix or operands in valid for `push' dmake: Error code 129, while making 'API.o' D:\MyPerl\Perl\Programs\XS\Temp\Win32-API-0.59>dmake test gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DUSE_SI TECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mm s-bitfields -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.59\" -DXS_VER SION=\"0.59\" "-IC:\strawberry\perl\lib\CORE" API.c API.xs: In function 'XS_Win32__API_GetProcAddress': API.xs:127: warning: cast from pointer to integer of different size API.xs: In function 'XS_Win32__API_PointerTo': API.xs:206: warning: cast from pointer to integer of different size API.xs: In function 'XS_Win32__API_ReadMemory': API.xs:223: warning: cast to pointer from integer of different size C:\Users\Robert\AppData\Local\Temp\ccuKQJFP.s: Assembler messages: C:\Users\Robert\AppData\Local\Temp\ccuKQJFP.s:3129: Error: suffix or operands in valid for `push' C:\Users\Robert\AppData\Local\Temp\ccuKQJFP.s:3132: Error: suffix or operands in valid for `push' dmake: Error code 129, while making 'API.o' -- Cosimo