I am attempting to use Gtk2 to create a user interface with Perl.
I have installed the various dependencies as described in the GTK Perl Tutorial, and continue to be unsucessful. Here is the test code.
#!/usr/bin/perl -w use Gtk; # load the Gtk-Perl module use strict; # a good idea for all +non-trivial Perl scripts set_locale Gtk; # internationalize init Gtk; # initialize Gtk-Perl # convenience variables for true and false my $false = 0; my $true = 1; # widget creation my $window = new Gtk::Window( "toplevel" ); my $button = new Gtk::Button( "Goodbye World" ); # callback registration $window->signal_connect( "delete_event", \&CloseAppWindow ); $button->signal_connect( "clicked", \&CloseAppWindow ); # show button $button->show(); # set window attributes and show it $window->border_width( 15 ); $window->add( $button ); $window->show(); # Gtk event loop main Gtk; # Should never get here exit( 0 ); ### Callback function to close the window sub CloseAppWindow { Gtk->exit( 0 ); return $false; } # END EXAMPLE PROGRAM
When I run this I get the error message
"Can't locate loadable object for module Glib in @INC (@INC contains: /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /System/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/Updates/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level .) at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/Gtk.pm line 30 Compilation failed in require at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/Gtk.pm line 30. BEGIN failed--compilation aborted at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/Gtk.pm line 30. Compilation failed in require at GTK1.pl line 16. BEGIN failed--compilation aborted at GTK1.pl line 16."
The executable modules for everything suggested by the tutorial.
Can anyone help me on this ??
In reply to Can't locate loadable object for module by ramyaesther84
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |