antioch has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I've recently been trying to install the Win32::Printer module on Windows XP running ActivePerl 5.8.3 using PPM. And after it says that its installed, it really isnt. There isnt anything in the Perl Win32 Module folder and perl still doesnt recognize it. So I attempted to install it again using PPM but still the same result. Then I tried to just simply copy the file 'Printer.pm' into the correct folder but that didn't work either and gave me the error message:

"Can't locate loadable object for module Win32::Printer in @INC (@INC contains: C :/Perl/lib C:/Perl/site/lib .) at test.pl line 1"    =\

I'm wondering if anyone else has had any problems installing this module or has any idea on what could be going wrong. Any help would be greatly appreciated.. Thanks.
  • Comment on Problems installing Win32::Printer Module

Replies are listed 'Best First'.
Re: Problems installing Win32::Printer Module
by davidj (Priest) on Jun 21, 2004 at 19:58 UTC
    I just tried installing it on my win2K system to verify your problem and I had the same problem. After I installed I ran a search for printer on my system and got the following search results:
    C:\Perl\site\lib\ppm-conf C:\Perl\site\lib\ppm-conf
    I read the ppd file for the download location, downloaded the file, and it is empty.
    I search CPAN and found Win32-Printer-0.8.0.zip. I unzipped it and found it has the required files. You might want to download it and install it without using ppm.

    davidj
Re: Problems installing Win32::Printer Module
by JSchmitz (Canon) on Jun 21, 2004 at 20:47 UTC
    Yes I have noticed this problem before also using CPANPLUS, CPAN or PPM - sometimes the modules choke on the auto install stuff but if you build them from scratch they are alright. You can also use the verify command from the ppm prompt and that should tell you if it is installed correctly.
Re: Problems installing Win32::Printer Module
by antioch (Sexton) on Jun 22, 2004 at 00:14 UTC
    Ah, I see. I knew it wasn't just me :P, haha. Well I downloaded the module zip and have the files but can you please tell me how to build/install them?

    Thanks for all your guys help! =)
Re: Problems installing Win32::Printer Module
by antioch (Sexton) on Jun 22, 2004 at 03:42 UTC
    Jeeze seems like this module won't seem to let me install it.

    When I run any of the nmake commands it gives me the error message:

    "cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY S -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.8.0\" -DXS_VERSION=\"0.8.0\" "-IC:\Perl\lib\CORE" Printer.c 'cl' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1' Stop."

    Bleh, I'm out of ideas once again. Do you guys get this error too while trying to use nmake, or is it working fine? I wish ppm had worked =(
      My configuration compiles and installs it just fine:
      win2K, visual C++ enterprise 6.0, win32-printer.0.8.0, activeState 5.8.3.809

      Not sure what suggestions I could give you at this point.

      sorry,
      davidj
Re: Problems installing Win32::Printer Module
by antioch (Sexton) on Jun 22, 2004 at 03:57 UTC
    Hmm.. tell me if this sounds right please.

    I downloaded the module (lets say the folder is C:\windows\desktop\Win32-Printer-0.8.0 ) and then I downloaded nmake. I copied the nmake files into the module folder and ran:

    1) perl Makefile.pl (it says that it couldnt find some .lib files but that its probably harmless)
    2) nmake (well i pretty much just stop here cause it gives me the error in my above post)

    Did I forget to put nmake in my path or what? I appreciate all the help your trying to give me.

    !EDIT: I've found out that it requires compilation since it has an .XS file in the archive. I'm guessing you didn't run into this because you have Visual C++ installed. It required the file 'cl.exe'. I'll update when again when/if I figure things out.