Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

GD and PAR/CAVA packager

by AndreaN (Novice)
on Sep 13, 2013 at 09:52 UTC ( #1053875=perlquestion: print w/replies, xml ) Need Help??
AndreaN has asked for the wisdom of the Perl Monks concerning the following question:


I'm having problems with CAVA or PP when packaging a Perl script into .exe. When executing the program on a machine that does not have Perl installed, I get the following error:

Can't load 'C:/MAT/lib/vrt/lotsofnumbersandletters/GD.dll' for module GD: load_file:The specified module could not be found at <content>/ line 157. at C:/MAT/lib/std/ line 3 Compilation failed in require at C:/MAT/lib/std/ line 3. BEGIN failed--compilation aborted at C:/MAT/lib/std/ line 3. Compilation failed in require at C:/MAT/lib/std/ line 3.

I get this error when using Cava. With PP I get a similar error. On a machine with Perl installed I tried to remove GD.dll from 'C:/MAT/lib/vrt/lotsofnumbersandletters/' and when I ran the programme I got exactly the same error as shown above. Therefore, it looks like it can't find GD.dll even though the dll is there where it should be. I looked this up on the internet and found some other people posting here with the same problem but I could not find a solution.

Any help is appreciated! Thanks!

Replies are listed 'Best First'.
Re: GD and PAR/CAVA packager (depends.exe)
by Anonymous Monk on Sep 13, 2013 at 10:38 UTC

      Unfortunately I'm not really competent with managing DLLs or dealing with these things, as I'm not a computer scientist. Anyway, when I run Dependency Walker on GD.dll I get a list of about 30 or more other DLLs. For two of them, actually, IESHIMS.DLL and WER.DLL, I get the warning "Error opening file. The system cannot find the file specified". So, if I understood correctly, I would have to add all of these 30 or so DLLs manually in the PP command line?

      Thank you

        You shouldn't have to manually add the dlls. pp uses Module::ScanDeps under the hood, and it'll take care of the dependencies for you. You will probably need to manually add GD to the command like this:
        /usr/bin/pp --gui -n -c -M GD -B -o out.exe
        See the documentation for the options. Give it a try and Good Luck!

        So, if I understood correctly, I would have to add all of these 30 or so DLLs manually in the PP command line?

        No, not all 30, you're probably only missing libbgd.dll , should be located somewhere near where you installed perl or cygwin or mingw

        In general, you don't add the .dll's that come with the operating system , stuff under %WINDIR%, %windir%\system32, like kernel32.dll user32.dll gdi32.dll comdlg32.dll advapi32.dll shell32.dll mciole32.dll ole32.dll oleaut32.dll netapi32.dll ws2_32.dll cmprops.dll mpr.dll mprapi.dll mprddm.dll mprdim.dll mprmsg.dll mprui.dll winmm.dll version.dll odbc32.dll odbc32gt.dll odbccp32.dll comctl32.dll

        $ perl -V:libs libs=' -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -l +advapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmp +r -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 ';

        kernel32.... they all come from microsoft with windows

Re: GD and PAR/CAVA packager
by AndreaN (Novice) on Sep 15, 2013 at 11:23 UTC

    Thanks to everyone for their help. I solved the issue following these steps:

    - used dependecy walker on GD.dll

    - noted the dll files that were NOT part of windows but just belonged to Perl (the ones in strawberry/perl or other folders related to Perl)

    - added them as extra dlls in Cava


    - added them manually with "-l" in the PP command line

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1053875]
Front-paged by Arunbear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2017-08-20 23:42 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (317 votes). Check out past polls.