So I have successfully installed Strawberry Perl 5.12, GTK2, and the Gtk-perl bindings on Windows XP SP3. I have tested and verified that the gtk-perl application works without any issue when just running the perl script manually, however when I package it via pp and link correctly, I seem to get an error when trying to start the application
--- Here is the error ---
C:\Documents and Settings\Administrator\Desktop\testgtk\test>testgtk.e
+xe
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion `g_t
+ype_from_n
ame (name) == 0' failed at C:/strawberry/perl/lib/DynaLoader.pm line 2
+23.
cannot register alias Gtk2::Pango::Attribute for the unregistered type
+ (null) at
C:/strawberry/perl/lib/DynaLoader.pm line 223.
Compilation failed in require at script/testgtk.pl line 1.
BEGIN failed--compilation aborted at script/testgtk.pl line 1.
-- Here is the pp + linking command i used --
pp -l "C:\strawberry\perl\site\lib\auto\Cairo\Cairo.dll" -l "C:\strawb
+erry\perl\site\lib\auto\Pango\Pango.dll" -l "C:\strawberry\perl\site\
+lib\auto\Glib\Glib.dll" -l "C:\strawberry\perl\site\lib\auto\Gtk2\Gtk
+2.dll" -o testgtk.exe testgtk.pl
-- Here is the sample GTK code that works manually --
use Gtk2 '-init';
$window = Gtk2::Window->new('toplevel');
$window->set_title("Hello World!");
$button = Gtk2::Button->new("Press me");
$button->signal_connect(clicked => sub { print "Hello again - the butt
+on was pressed\n"; });
$window->add($button);
$window->show_all;
Gtk2->main;
0;
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.