Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I'm trying to pack/compile (using: http://search.cpan.org/~autrijus/PAR/script/pp with pp --gui -o test.exe test.pl) this simple app:
#!/usr/bin/perl -w

use Win32::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;
}
#EOF
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 error: Can't locate Win32.pm in @INC (@INC contains c:\strawberry \perl\vendor\lib .) I've also tryed:

pp --lib c:\strawberry\perl\lib -M Win32::GUI -o test.exe test.pl
but the result was pretty much the same, throwning an error that it was not able to find Win32.pm. Any ideas how to fix it ?

Replies are listed 'Best First'.
Re: Par and Win32 does not work ?
by marto (Cardinal) on Dec 09, 2010 at 10:12 UTC

    pp has been part of PAR::Packer for some time now. If you are using an old version (which you link to) consider upgrading your version of PAR, install PAR::Packer, checking the open bugs.

Re: Par and Win32 does not work ?
by Corion (Patriarch) on Dec 09, 2010 at 10:12 UTC

    Try also adding -M Win32 ?