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

I've started playing around with PAR, and I've hit a snag when it comes to building and executing standalones on Win32. Specifically - if I've used any non-core modules in the code. I've reduced this to the simplest possible case in order to demonstrate my problem. Please consider the following:
K:\Perl\temp>type bar.pl use Cwd; print "Hello World\n"; K:\Perl\temp>pp -o bar.exe bar.pl K:\Perl\temp>bar.exe Hello World
So far, so good. However....
K:\Perl\temp>type foo.pl use Data::Dumper::Simple; print "Hello World\n"; K:\Perl\temp>foo.pl Hello World K:\Perl\temp>pp -o foo.exe foo.pl
If I then try to run foo.exe, I first get a dialog box with this:
"The procedure entry point PL_memory_wrap could not be located in the +dynamic link library perl58.dll"
and then the following error:
K:\Perl\temp>foo.exe Can't load 'K:\DOCUME~1\Darren\LOCALS~1\Temp\par-Darren\cache-11429565 +20\b007796 b.dll' for module Data::Dumper: load_file:The specified procedure coul +d not be f ound at D:/cpanrun/build/5-8-0/lib/DynaLoader.pm line 229. at ../blib/lib/PAR/Heavy.pm line 107 Compilation failed in require at Data/Dumper/Simple.pm line 6. BEGIN failed--compilation aborted at Data/Dumper/Simple.pm line 6. Compilation failed in require at script/foo.pl line 1. BEGIN failed--compilation aborted at script/foo.pl line 1.
So basically, if I include any non-core modules - it borks. I've tried it with various modules, all with the same result. I'm guessing that perhaps something is screwed wth my libraries or path - but I'm not sure where to start looking.

Can somebody please point me in the right direction?

Update: - removed external (image) link as suggested by davidrw.

Update 2: - problem solved. Many thanks to pboin for the pointer :)

Thanks,
Darren :)

Replies are listed 'Best First'.
Re: Problem including non-core modules in a PAR executable (Win32)
by davidrw (Prior) on Mar 21, 2006 at 16:26 UTC
    See if PP Win32::OLE and creating exe's points you in the right direction ..

    (and please in the future type out the one-line error message instead of screen shot'ing it--normally i wouldn't have clicked on the image link, and would have missed the connection here)
      Thanks, I've updated and removed the image link.

      Actually, I just googled for that error message (dunno why I didn't do that earlier - duh!) and the first hit I got was this

      Looks like (I've been bitten by) a bug?

Re: Problem including non-core modules in a PAR executable (Win32)
by pboin (Deacon) on Mar 21, 2006 at 19:12 UTC

    Darren:

    That's a funky error, and I've struggled with it recently. I can't remember exactly what caused it, but eventually, I found a clue that indicated I install PAR-587 instead of PAR. That fixed it.

    Try here for more info: Randy Kobe's post in perl.par

      Great, thanks :)

      Installing and using PAR-587 did indeed solve my problem!