缺少' libexpat-1_.dll'用pp执行的可执行文件的错误

时间:2016-10-24 17:55:00

标签: perl perl-packager pp-perl-par-packager

我使用Strawberry Perl使用pp制作了exe文件,但是当我在另一台机器上运行时,我收到以下错误:

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

我使用此命令创建可执行文件:

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

我尝试使用-a "c:\strawberry\c\bin\libexpat-1_.dll"(没有帮助)和-l "c:\strawberry\c\bin\libexpat-1_.dll"("无法找到共享库..."错误)。

如何解决此问题?

1 个答案:

答案 0 :(得分:1)

我在DLL名称中输入了一个拼写错误。使用-l选项解决了问题。不需要在命令中指定模块,因为pp扫描所用模块的脚本,并自动包含它们。用它构建:

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