Hello,

I inherited a windows-based program written in perl and using GTK. I'm trying to figure out how to install / recreate this system on a new Windows XP install.

I have the program running but when I try to set the printers, it fails to see any printers and the perl window shows the error:

*** unhandled exception in callback: *** Undefined subroutine &Win32::Printer::Enum::Printers called at Shi +p_program/Printing.pm line 513. *** ignoring at .\connect.pl line 17.

I tried to install Win32::Printer from CPAN, Win32-Printer-0.9.1, but it wasn't finding 'make' or 'nmake' so I installed 'nmake' and now nmake gives a fatal error, package 'cl' not found. I tried installing MinGW and Visual Studio but got frustrated with this avenue because I kept getting the same error no matter what.(clearly I am not a windows guy!!)

So I tried just copying over the Printer folder from the existing computer, which has the Enum.pm in there, from/to 'C:/Perl/site/lib/Win32/Printer', but it still gives me the same undefined sub when i hit printer preferences.

I tried copying over the PATH environment variables but still no luck.

Any ideas what's going wrong, any suggestions? Do I need to get Win32-Printer to install properly? thank you very much in advance for any help!


In reply to need help setting up an existing perl program in windows by joetesta

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.