From: Ulisses G. <ul...@ib...> - 2004-06-30 19:21:56
|
Perl2exe works fine for my Wx programs (both Win32 & Linux). Try this: package DemoFrame; #use base qw(Wx::Frame); # do not use this way use vars qw(@ISA); # instead, use like this @ISA =3D qw(Wx::Frame); ulisses ----- Original Message -----=20 From: Reuven M. Lerner=20 To: wxp...@li...=20 Sent: Wednesday, June 30, 2004 3:15 PM Subject: [wxperl-users] Problems with perl2exe and Wx Hi, everyone. I'm trying to package up a Wx program using Perl2Exe, = and I'm experiencing some problems. I saw (on the list archives) that a = few other people have been using it without trouble, and I was hoping = that someone might be able to suggest what I should do. My application, which runs fine under usual Perl, refuses to be = compiled by Perl2Exe. It exits with an error saying that it cannot find = Wx/Frame.pm. Of course, there isn't any Wx/Frame.pm, since Wx::Frame is = defined in the DLL. I've added "#perl2exe_bundle" lines for both Wx.dll and wxmsw242u.dll, = but the Perl2Exe compiler still exits, saying that it cannot find = Wx::Frame in @INC. I don't even get to the stage of running my program! I have to wonder if the problem stems from the way in which I've = structured my Wx program: a.. My main program (scanner-check.pl) is a very small program that = does nothing more than create an instance of MyScannerApp and then = invokes $app->MainLoop(). =20 b.. I have defined MyScannerApp in a completely separate file = (MyScannerApp.pm); it defines a single method, OnInit, which then = creates an instance of ScannerCheckFrame.=20 c.. I have defined ScannerCheckFrame in a separate file = (ScannerCheckFrame.pm), which is where the event handlers are defined, = and where the real action happens.=20 So rather than having all of these packages defined within a single = file, which appears to be traditional with WxPerl, I've put them into = three separate files. This hasn't had any negative consequences until = now, but I have to wonder if it's causing me problems. If anyone else has experience with Perl2Exe and Wx, I would greatly = appreciate finding out what I'm doing wrong! Thanks in advance, Reuven |