perlperl-packagerpp-perl-par-packager

Missing 'libexpat-1_.dll' error for executable made with pp


I made exe file with pp using Strawberry Perl, but when I run it on another machine, I get following error:

The program can't start because libexpat-1__.dll is missing from your computer. Try reinstalling the program to fix this problem. 

I make the executable with this command:

pp -M FindBin -M DateTime -M DateTime::Format::JSON::MicrosoftDateFormat -M DateTime::Format::DateParse -M REST::Client -M JSON::XS -M Spreadsheet::ParseExcel -M Spreadsheet::ParseXLSX -M Log::Log4perl::Tiny -o test.exe test.pl

I tried using -a "c:\strawberry\c\bin\libexpat-1_.dll" (didn't help) and -l "c:\strawberry\c\bin\libexpat-1_.dll" ("Can't find shared library.." error).

How can I resolve this issue?


Solution

  • I had a typo in DLL name. Using -l option resolved issue. Specifying modules in the command wasn't necessary, as pp scans script for the used modules, and includes them automatically. Built it with:

    pp -l "libexpat-1__.dll" -o test.exe test.pl