Hi there ...
I hacked the following lines of code,
based on the example with the Win32 MsgBox on
Perl.com:
use Inline C => DATA =>
LIBS => `gtk-config --libs`,
INC => `gtk-config --cflags`,
PREFIX => 'gtk_';
hello_world("Hi there ...\n", $#ARGV, @ARGV);
__END__
__C__
#include <gtk/gtk.h>
int gtk_hello_world(char *msg, int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *button;
gtk_init(&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_button_new_with_label(msg);
gtk_container_add (GTK_CONTAINER (window), button);
gtk_widget_show (button);
gtk_widget_show (window);
gtk_main ();
}
It compiles without an error, but Perl complains ...
Can't locate auto/main/hello_world.al in @INC (@INC contains: /home/jens/_Inline/lib
/usr/local/lib/perl/5.6.0 /usr/local/share/perl/5.6.0 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.6.0 /usr/share/perl/5.6.0 /usr/lib/perl5/5.6/i386-linux
/usr/lib/perl5/5.6 /usr/lib/perl5/5.005/i386-linux .) at greetz.pl line 8
It's a stupid example because there is already a mature Gtk+ binding
for Perl, but I needed a little "advanture" ;-))
--
with friendly regards....
jens luedicke <[EMAIL PROTECTED]>
PMC - Perl Mail Client
http://www.irs-net.com/
M$ Windows: Bovine Spongiform Encephalopathy
for Personal Computers ...