KONOVALOV, Vadim (Vadim)** CTR ** wrote:
#!<blah>/perl/5.8.2/bin/perl use Tcl::Tk; my $m =
Tcl::Tk::MainWindow->new();
IMO at the moment of this line both libtcl84.so and libtk84.so
already loaded, otherwise you'll get an error.
I agree. libtcl8.4.so and libtk8.4.so should be loaded at this point.
Otherwise I shouldn't be able to open create a toplevel MainWindow.
But I think that it is different than
/usr/csite/pubtools/tcl/8.4/lib/libtcl8.4.so
I'm trying to understand how that can be so, since
"/usr/csite/pubtools/tcl/8.4/lib/libtcl8.4.so" is the only copy of
libtcl8.4.so that exists on the system. Really.
Actually I am (almost) out of advices, but there is one point to consider.
Perl module named Tcl is actually is a very thin wrapper.
Most of my GUI-programs now are
$int->Eval(<<'EOS');
#bunch of GUI constructing code goes here
EOS
my $widget_NNNN = $int->widget('.w.i.d.get.NNN','Widget::Type');
$widget_NNNN->doSomeMethod(args);
So, if you can not do
$int->Eval(<<'EOS');
package require BLT
EOS
then under 'wish' you also will not be able to succesfully do
package require BLT
Please find "pkgIndex.tcl" file within somewhere .../blt2.4/pkgIndex.tcl
It does at the end
set version "2.4"
package ifneeded BLT $version [list LoadBLT $version $dir]
May be the problem is with finding this shared library?
try adding debugging "puts" statements around these lines
Hi Vadim,
Thanks very much for your help with our little problem. I am out of
ideas on this. I can do a "package require BLT" in both wish and tclsh
just fine with no problems. And when I try to load BLT into Perl, the
error is not that it cannot find the BLT package library. The problem is
that when it tries to load that library there is a missing symbol. That
symbol is found only in libtcl8.4.so. If I manually load that library
before loading BLT then everything works. The odd thing is that I
shouldn't have to do that. The Tcl.so used by perl should already be
loading libtcl8.4.so.
Since I have a work-around and we are using a slightly antique version
of Perl, I am not going to invest any more effort in this until we are
more up to date. If we still have the problem with up to date Perl and
Tcl, then you may hear from me again if that's ok.
Thanks again.
Best Regards,
--Brian
--
Brian S. Bevins, PE
Computer Scientist / Mechanical Engineer
Thomas Jefferson National Accelerator Facility
"Nothing in all the world is more dangerous than
sincere ignorance and conscientious stupidity."
--Martin Luther King Jr.