perlcc+Tk: Can't locate object...

Ondrej Koala Vacha koala na fi.muni.cz
Neděle Leden 3 13:50:38 MET 1999



Dobry den,

zkousel jsem prevest do zkusebni programek do c a spustit.
Vse probehne OK, spusteni vsak skonci s hlaskou:

Can't locate object method "new" via package "MainWindow".


Nema s tim nekdo zkusenosti? V archivu tk jsem se docetl,
ze to snad zpusobuje konflikt per/Tk a Tcl/Tk, ale vyzkousel
jsem vsechno mozne a nic na to neukazuje.



s pranim hezkeho noveho roku

-
Ondrej Koala Vacha



$ cat n1.pl

#!/usr/bin/perl
use Tk;
my($top) = MainWindow->new;

my $button = $top->Button(-text => 'Hello World');
$button->pack();

MainLoop;

$ perlcc n1.pl

--------------------------------------------------------------------------------
Compiling n1.pl:
--------------------------------------------------------------------------------
Making C(n1.pl.c) for n1.pl!
perl -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5
-I/usr/lib/perl5/site_perl/i386-linux -I/usr/lib/perl5/site_perl -I.
-MO=CC,-on1.pl.c n1.pl
n1.pl syntax OK
Compiling C(n1) for n1.pl!
perl -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5
-I/usr/lib/perl5/site_perl/i386-linux -I/usr/lib/perl5/site_perl -I.
/tmp/n1.pl.tst
cc -Dbool=char -DHAS_BOOL -I/usr/local/include
-I/usr/lib/perl5/i386-linux/5.00404/CORE
/usr/lib/perl5/i386-linux/5.00404/auto/Fcntl/Fcntl.so
/usr/lib/perl5/site_perl/i386-linux/auto/Tk/Tk.so -o n1 n1.pl.c
-L/usr/local/lib -L/usr/lib/perl5/i386-linux/5.00404/CORE -lperl -lnsl
-lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
darkstar:~/perl/Compiler-a3
$ ./n1
Can't locate object method "new" via package "MainWindow".





Další informace o konferenci Perl