Hello, everybody.
I decided to try the Active State Perl DevKit, so I have downloaded the Evaluation version. I make EXEs from scripts with PerlApp, and all seems to work. But there is something strange with scripts that use Tk. Here is a code sample:

#!/usr/bin/perl -w use Tk; $wind = MainWindow->new(); $wind->Label( -text => 'Some text' )->pack(); $wind->Button( -text => "Click!", -command => \&display )->pack(-side => 'left'); $text = $wind->Text(-width => 40, -height => 4)->pack(); $text->bind('<Double-1>', \&display); sub display { $text->insert('end', "Hello, Tk!"); } MainLoop;

I try to generate a freestanding EXE and not include Perl56.dll into executable, so I run PerlApp with the following options:

perlapp tk_test.pl -f -x -g

The puzzle for me is, that when I run the resulting EXE on a PC with no Perl installed (but, of course, where Perl56.dll exists in this EXE directory), the system tries to do it, but the window does not appear on screen and no error message is generated.

Moreover, when I do not use the -x option and get an enormous EXE, the situation is the same, with the only difference, that on the machine where Perl is installed I cannot run the EXE either!

Can anyone give me a hint? I will appreciate any advice.

Pavel


In reply to GUI (Tk) executables via PerlApp by Pavel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.