in reply to Re: pp missing module error
in thread pp missing module error

I've altered the pp command as follows:
pp -v --output myprogram.exe --link=C:\Strawberry\c\bin\libgd-3__.dll +--link=C:\Strawberry\perl\vendor\lib\auto\Class\Load\XS\XS.xs.dll myp +rogram.pl
Still getting the same error.

I REALLY don't want to have to install perl and libraries on a target computer to run this - people just want an exe to run ...

Replies are listed 'Best First'.
Re^3: pp missing module error
by haj (Vicar) on May 27, 2020 at 21:14 UTC
    Ok, I got hold of two Windows systems... one to build the executable, the other with no Strawberry (such things exist!) to run it. Here's the pp invocation in my .bat file:
    pp --verbose ^ --link=libgd-3__.dll ^ --link=libbz2-1__.dll ^ --link=libgraphite2__.dll ^ --link=libharfbuzz-0__.dll ^ --link=libfreetype-6__.dll ^ --link=libiconv-2__.dll ^ --link=libjpeg-9__.dll ^ --link=liblzma-5__.dll ^ --link=libpng16-16__.dll ^ --link=libtiff-5__.dll ^ --link=libXpm__.dll ^ --link=zlib1__.dll ^ --module=GD ^ --output=gdpacked.exe ^ pack_gd.pl

    The program pack_gd.pl is just the synopsis from GD on metacpan. Running pp produces no error, and running the executable prints a PNG image. So when you run it, remember to redirect the output to a .png file.

    In my first reply, I mixed up some dashes with underscores and missed a few dependencies. Sorry.

      Thanks very much - this worked - explicitly linking in the list of libraries.

      I did also try ppsimple - however the install of Proc::Background failed test 47 and did not install - after installing SomeUtils and AllUtils. But, I digress.

      My sincere thanks to everyone who chimed in to help - and get this off zero for me - you are appreciated :)

Re^3: pp missing module error
by haj (Vicar) on May 27, 2020 at 19:54 UTC
    Oh well... The GD library has a few dependencies by itself. Here's a list of suspects:
    • libfreetype_6__.dll
    • libiconv_2__.dll
    • libjpeg_9__.dll
    • libpng16_16__.dll
    • libtiff_5__.dll
    • libXpm__.dll
    • zlib1__.dll

    That's just from the strings in libgd-3__.dll, I can't say whether the list is comprehensive. I'll probably get some time to experiment on my Windows box in a few days.

    As an aside: As far as I can say, You don't need to provide the absolute path to the libraries. pp should find them as they're on pp's path.