http://www.perlmonks.org?node_id=216788

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

Hello fellow monks,

I've been trying to use Win32::GUI (0.558) on my Win2k/ActivePerl 633 system to create windows. So far, I've been taking code straight from the tutorial.

use Win32::GUI; $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, ); $main->AddLabel(-text => "Hello, world"); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; }
When I run this script, Windows informs me that perl.exe has "generated errors and will be closed by windows". If I reduce the code to
use Win32::GUI; $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, ); $main->Show();
it "works" (generates a window which vanishes instantly). As soon as I add  $main->AddLabel(-text => "Hello, world");, however, the error returns.

Can any wise monks help me here?

<-> In general, we find that those who disparage a given operating system, language, or philosophy have never had to use it in practice. <->