Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Can't locate loadable object for module

by ramyaesther84 (Initiate)
on May 09, 2014 at 05:48 UTC ( [id://1085547]=perlquestion: print w/replies, xml ) Need Help??

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

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 ??

Replies are listed 'Best First'.
Re: Can't locate loadable object for module
by Anonymous Monk on May 09, 2014 at 07:00 UTC

    I have installed the various dependencies as described in the GTK Perl Tutorial, and continue to be unsucessful.

    How did you install them and where?

    When I run this I get the error message "Can't locate loadable object for module Glib in @INC

    That pretty much means you did not install Glib as required :)(files are missing, namely Glib.so) the standard way with make/Makefile.PL, same way as described in Glib/README ... mostly just letting cpan/cpanm/cpanp handle it

    /System/Library/Perl/5.8.8/darwin-thread-multi-2level

    That appears to be a "system perl", you might consider installing your own :) http://www.citrusperl.com/download.html, Installing Perl on OSX - learn.perl.org

      Thanx Anonymous Monk.

      Can u Please tell me where can I save glib.pm module.

      Thanx in advance

        Can u Please tell me where can I save glib.pm module

        I tried -- you don't save it anywhere, you let the cpan/make... take care of it

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1085547]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-19 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found