How can I properly install Win32::GuiTest?

扶醉桌前 提交于 2019-12-13 09:23:38

问题


I am trying to use Win32::GuiTest and with Windows XP and perl version 5.8.6.

I am getting the following error:

Can't locate loadable object for module Win32::GuiTest in @INC (@INC contains: 
C:/Perl/lib C:/Perl/site/lib .) at E:\a\simply.pl line 259
  Compilation failed in require at E:\a\simply.pl line 259.
  BEGIN failed--compilation aborted at E:\a\simply.pl line 259

I tried following the instructions for Win32-GuiTest-1.3. I tried to install:

I created C:\TEMP and I downloaded the zip file and extracted the contents and placed in C:\TEMP and gave the command

C:\TEMP>ppm
ppm> install C:\temp\win32-guitest.ppd

It is giving an error as...

Error: no suitable installation target found for package Win32-GuiTest.

If I use the package Win32-GuiTest-1.56, it is giving the error

Error: Package 'win32-guitest' not found. Please 'search' for it first.

and if i use the command

C:\temp>ppm
ppm> install Win32::GuiTest

i get the error as...

Error: No valid repositories:
Error: 501 Protocol scheme '' is not supported
Error: 501 Protocol scheme '' is not supported

i downloaded from http://search.cpan.org/~erngui/Win32-GuiTest-1.3/GuiTest.pm for package Win32-GuiTest-1.3 and http://search.cpan.org/dist/Win32-GuiTest/lib/Win32/GuiTest.pm for package Win32-GuiTest-1.56


回答1:


Update: Given that you get Error: No valid repositories, clearly you have somehow borked your ppm configuration. Add some repositories.

Original answer:

Use ppm to install the module:

ppm install Win32::GuiTest
C:\Home> ppm install Win32::GuiTest
Downloading ActiveState Package Repository packlist...done
Updating ActiveState Package Repository database...done
Downloading bribes packlist...done
Updating bribes database...done
Downloading trouchelle packlist...done
Updating trouchelle database...done
Downloading uwinnipeg packlist...not modified
Downloading wxperl packlist...done
Updating wxperl database...done
Downloading Win32-GuiTest-1.54...done
Unpacking Win32-GuiTest-1.54...done
Generating HTML for Win32-GuiTest-1.54...done
Updating files in site area...done
  15 files installed

If you want to download the latest and the greatest:

C:\Temp> wget http://search.cpan.org/CPAN/authors/id/K/KA/KARASIK/Win32-GuiTest-1.56.tar.gz
C:\Temp> tar -xzvf Win32-GuiTest-1.56.tar.gz
C:\Temp> cd Win32-GuiTest-1.56
C:\Temp\Win32-GuiTest-1.56> perl Makefile.PL
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Checking if your kit is complete...
Looks good
Writing Makefile for Win32::GuiTest
C:\Temp\Win32-GuiTest-1.56> dmake
C:\Temp\Win32-GuiTest-1.56> dmake test
C:\Temp\Win32-GuiTest-1.56> dmake install

You need to install mingw for this to work.




回答2:


If you have Active perl installed in your system, open perl package manager. Click on view menu and then click on all packages. In the search box enter win gui. It will list WIN GUI package in grey (not installed ). Mark it for installation and click on green right arrow at top.




回答3:


I'm using Strawberry Perl, Win32-GuiTest-1.60

perl Makefile.PL
dmake
dmake install

Then the module is up.



来源:https://stackoverflow.com/questions/2092784/how-can-i-properly-install-win32guitest

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!