Hello Perl Monks!

Strawberry perl 5, version 30, subversion 1 (v5.30.1) built for MSWin32-x64-multi-thread

pp PAR Packager, version 1.050 (PAR version 1.016)

I have a Tk application which uses GD. The Tk displays the image, and the GD portion is used to resize the image, and interrogate the pixels in the image.

The GD code does snippets include the following:

# Now make a thumbnail the size of the selected SIZE my $thumbnail = new GD::Image($W,$H); # Read in jpg $image = GD::Image->newFromJpeg($IMAGE{'Pathfile'}); # GD $image->copyResized($sourceImage,$dstX,$dstY,$srcX,$srcY,$d +estW,$destH,$srcW,$srcH) $thumbnail->copyResized($image, 0, 0, 0, 0, $W, $H, $IMAGE{'Widt +h'}, $IMAGE{'Height'}); # Get the resized image as a jpg $thumbdata = $thumbnail->jpeg();
The GD code in the perl program works well. Original image is read in, resized, and saved as a thumbnail - as expected.

However, when I "package" the code using pp - I get the following error when I try to use it on a computer that does NOT have perl installed.

Can't load 'C:\Users\nzsvz9\AppData\Local\Temp\par-6576616e63\cache-c9 +a4a6bfb082a4aa29b32277a1db1b29b2e1e568\4efc3f8a.xs.dll' for module GD +: load_file:The specified module could not be found at <embedded>/Dyn +aLoader.pm line 193. at <embedded>/PAR/Heavy.pm line 140. Compilation failed in require at script/myprogram.pl line 11. BEGIN failed--compilation aborted at script/myprogram.pl line 11.
Which to me is the program can't find xs.dll - do I need to explicitly include this in the pp command? If so, how?

BTW: Line 11 is the following not-so-very complex but important line:

use GD;
I have tried several options with pp - to no avail. I tried -M GD.pm and -x but it makes no difference.
pp -o myprogram.exe -x myprogram.pl
There is another potential complication involved, of course. When exiting the perl Tk program I often get the "TK_FreeCursor received unknown cursor argument" which I know to be a problem in the Tk libraries where Tk_Cursor is inconsistent with Tk_FreeCursor (or so I've read) and needs to be fixed - but I don't expect it's contributing to this pp error. Although if someone would fix that - I'd be grateful. Or, if someone would teach me how ... but I digress. My apologies.

Any guidance or wisdom is appreciated that leads me to a solution.

Regards,

nzsvz9 - formerly known as the guy who could fix problems, now known as the guy asking for help with problems :(

And - a quote just to provoke thought:

"There are three ways to spoil a public man: women, gambling, and listening to experts.

The first is the pleasantest, the second is the fastest, but the third is the most certain." ~ Georges Pompidou


In reply to pp missing module error by nzsvz9

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.