Perl packed/compiled GUI app does not start/not work?
I'm trying to pack/compile this simple app using pp with pp --gui -o test.exe test.pl
:
#!/usr/bin/perl -w
use Win3开发者_如何学C2::GUI();
use Win32::TieRegistry (Delimiter => "/");
use File::Basename;
use strict;
my $slabel;
my $main = Win32::GUI::Window->new(
-name => 'User APP',
-title => "User APP",
-width => 550,
-height => 300,
);
$main->Show();
Win32::GUI::Dialog();
exit(0);
sub Main_Terminate {
return -1;
}
However it does not work, it does not start for some reason. Any ideas why?
If I try to compile/pack it using pp -o test.exe test.pl
then I get the error
Can't find Win32.pm.
I'm stuck with this.
Have you tried "pp -M Win32 ..."? The -M argument adds modules that aren't autodiscovered via the Module::ScanDeps heuristics.
精彩评论