Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Installing Win32::Screenshot

by speedyswimmer1000 (Initiate)
on Apr 04, 2013 at 06:23 UTC ( #1026936=perlquestion: print w/replies, xml ) Need Help??
speedyswimmer1000 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I'm working on installing Win32::Screenshot, and as I gather from googling around a bit and trying to get all the dependencies worked out, it's a bit of a headache. So far I've managed to get the proper version of Image::Magick installed. Here's what I get when I go to CPAN for that module:

CPAN: CPAN::SQLite loaded ok (v0.202) Database was generated on Thu, 04 Apr 2013 04:02:24 GMT CPAN: Module::CoreList loaded ok (v2.76) Image::Magick is up to date (6.83).

The problem is that I then try to go and install the Win32::Screenshot module from CPAN and it fails some of the tests and overall fails to install for me - it's not working in my script.

CPAN: CPAN::SQLite loaded ok (v0.202) Database was generated on Thu, 04 Apr 2013 04:02:24 GMT Running install for module 'Win32::Screenshot' Running make for P/PS/PSME/Win32-Screenshot-1.20.tar.gz CPAN: Digest::SHA loaded ok (v5.73) CPAN: Compress::Zlib loaded ok (v2.055) Checksum for C:\strawberry\cpan\sources\authors\id\P\PS\PSME\Win32-Scr +eenshot-1.20.tar.gz ok CPAN: Archive::Tar loaded ok (v1.90) CPAN: File::Temp loaded ok (v0.22) CPAN: Parse::CPAN::Meta loaded ok (v1.4404) CPAN: CPAN::Meta loaded ok (v2.120921) Building P/PS/PSME/Win32-Screenshot-1.20.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Win32::Screenshot Writing MYMETA.yml and MYMETA.json CPAN: Module::CoreList loaded ok (v2.76) cp blib\lib\Win32\ C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap +Screenshot.xs > Screenshot.xsc && C:\strawberry\perl\bin\perl.exe -ME +xtUtils::Command -e mv -- Screenshot.xsc Screenshot.c gcc -c -I. -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT +_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s - +O2 -DVERSION=\"1.20\" -DXS_VERSION=\"1.20\" "-IC:\strawber +ry\perl\lib\CORE" Screenshot.c Running Mkbootstrap for Win32::Screenshot () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Sc C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Win32::Screenshot\", 'DLBASE' => 'Screen +shot', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_V +ARS' => []);" dlltool --def Screenshot.def --output-exp dll.exp g++ -o blib\arch\auto\Win32\Screenshot\Screenshot.dll -Wl,--base-file +-Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberr +y\c\lib" Screenshot.o C:\strawberry\perl\lib\CORE\libperl516.a C:\s +trawberry\c\i686-w64-mingw32\lib\libmoldname.a C:\strawberry\c\i686-w +64-mingw32\lib\libkernel32.a C:\strawberry\c\i686-w64-mingw32\lib\lib +user32.a C:\strawberry\c\i686-w64-mingw32\lib\libgdi32.a C:\strawberr +y\c\i686-w64-mingw32\lib\libwinspool.a C:\strawberry\c\i686-w64-mingw +32\lib\libcomdlg32.a C:\strawberry\c\i686-w64-mingw32\lib\libadvapi32 +.a C:\strawberry\c\i686-w64-mingw32\lib\libshell32.a C:\strawberry\c\ +i686-w64-mingw32\lib\libole32.a C:\strawberry\c\i686-w64-mingw32\lib\ +liboleaut32.a C:\strawberry\c\i686-w64-mingw32\lib\libnetapi32.a C:\s +trawberry\c\i686-w64-mingw32\lib\libuuid.a C:\strawberry\c\i686-w64-m +ingw32\lib\libws2_32.a C:\strawberry\c\i686-w64-mingw32\lib\libmpr.a +C:\strawberry\c\i686-w64-mingw32\lib\libwinmm.a C:\strawberry\c\i686- +w64-mingw32\lib\libversion.a C:\strawberry\c\i686-w64-mingw32\lib\lib +odbc32.a C:\strawberry\c\i686-w64-mingw32\lib\libodbccp32.a C:\strawb +erry\c\i686-w64-mingw32\lib\libcomctl32.a dll.exp dlltool --def Screenshot.def --base-file dll.base --output-exp dll.exp g++ -o blib\arch\auto\Win32\Screenshot\Screenshot.dll -mdll -s -L"C:\s +trawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Screenshot.o C:\st +rawberry\perl\lib\CORE\libperl516.a C:\strawberry\c\i686-w64-mingw32\ +lib\libmoldname.a C:\strawberry\c\i686-w64-mingw32\lib\libkernel32.a +C:\strawberry\c\i686-w64-mingw32\lib\libuser32.a C:\strawberry\c\i686 +-w64-mingw32\lib\libgdi32.a C:\strawberry\c\i686-w64-mingw32\lib\libw +inspool.a C:\strawberry\c\i686-w64-mingw32\lib\libcomdlg32.a C:\straw +berry\c\i686-w64-mingw32\lib\libadvapi32.a C:\strawberry\c\i686-w64-m +ingw32\lib\libshell32.a C:\strawberry\c\i686-w64-mingw32\lib\libole32 +.a C:\strawberry\c\i686-w64-mingw32\lib\liboleaut32.a C:\strawberry\c +\i686-w64-mingw32\lib\libnetapi32.a C:\strawberry\c\i686-w64-mingw32\ +lib\libuuid.a C:\strawberry\c\i686-w64-mingw32\lib\libws2_32.a C:\str +awberry\c\i686-w64-mingw32\lib\libmpr.a C:\strawberry\c\i686-w64-ming +w32\lib\libwinmm.a C:\strawberry\c\i686-w64-mingw32\lib\libversion.a +C:\strawberry\c\i686-w64-mingw32\lib\libodbc32.a C:\strawberry\c\i686 +-w64-mingw32\lib\libodbccp32.a C:\strawberry\c\i686-w64-mingw32\lib\l +ibcomctl32.a dll.exp C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 755 bl +ib\arch\auto\Win32\Screenshot\Screenshot.dll C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e cp -- Screensho blib\arch\auto\Win32\Screenshot\ C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 bl +ib\arch\auto\Win32\Screenshot\ PSME/Win32-Screenshot-1.20.tar.gz C:\strawberry\c\bin\dmake.exe -- OK CPAN: YAML::XS loaded ok (v0.38) Running make test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib\lib', 'blib\arch')" t/*.t t/Win32-Screenshot.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 11/11 subtests Test Summary Report ------------------- t/Win32-Screenshot.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 11 tests but ran 0. Files=1, Tests=0, 0 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU +) Result: FAIL PSME/Win32-Screenshot-1.20.tar.gz C:\strawberry\c\bin\dmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports PSME/Win32-Screenshot-1.20.tar.gz Running make install make test had returned bad status, won't install without force Stopping: 'install' failed for 'Win32::Screenshot'.

Point being that this is rather nasty and not working. So let's assume that I know how to google and have looked around for a little while to try and get to the heart of this problem, but I haven't been able to get the module installed yet. What I need is a step-by-step, as much as possible, instructions of how to get this module installed. I'm running Windows 7. Thanks for your help!

Replies are listed 'Best First'.
Re: Installing Win32::Screenshot ( is pointless, install Imager::Screenshot )
by Anonymous Monk on Apr 04, 2013 at 07:00 UTC
      That will do, thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1026936]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-06-27 18:15 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (611 votes). Check out past polls.