I'm running activestate perl 5.8 on windows2000. I installed PAR and Wx via the ppm.bat utility. They both install fine and work fine, I.e. my test Wx script:
#!/usr/bin/perl -w
use strict;
use Wx;
###########################################################
#
# Define our HelloWorld class that extends Wx::App
#
package HelloWorld;
use base qw(Wx::App); # Inherit from Wx::App
sub OnInit
# Every application has its own OnInit method that will
# be called when the constructor is called.
{
my $self = shift;
my $frame = Wx::Frame->new( undef, # Parent window
-1, # Window id
'Hello World', # Title
[1,1], # position X, Y
[200, 150] # size X, Y
);
$self->SetTopWindow($frame); # Define the toplevel window
$frame->Show(1); # Show the frame
}
###########################################################
#
# The main program
#
package main;
my $wxobj = HelloWorld->new(); # New HelloWorld application
$wxobj->MainLoop;
works fine when I run it from the command line, "perl wxtest.pl". I get my nice window and stuff. I have another simple test script, test.pl which just contains
print "hi". Then I did pp -o test.exe test.pl. The produced test.exe works fine and prints "hi".
However when I run pp wxtest.pl; I get a nice executable named 'a.exe', but when I try to run it from the command line, nothing happens. It just returns instantly. I then switched to the filemanger and tried to run it by double clicking. The first time I double click it, I get a nice wx window and a dos box. I close this, then click on a.exe again. A dos box flashes and goes away instantly. No window. I double click it again, I get the wx window and a dos box. This repeats for as long as I've tried it.
I'm guessing this is some bug with how PAR is extracting the files it contains, but I have no clue what to do about it. Anyone ever heard of anything like this?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.