How to Get ActiveState Perl to use ActiveState Tcl when using the Perl Tcl package...

Posted by jobaca on 2011-03-23 23:46

I have installed 5.8 activestate perl and 8.4 activestate tcl...

Im doing this in perl:

use Tcl;

$interp = Tcl->new;

When i $interp->Eval('package require struct') i get the message:

"cant find package struct..."

If i tclsh:

> tclsh
% package require struct

So I had assumed that if I had NO Tcl package previously installed and I downloaded Activestate Perl and Tcl that the Perl would use the Tcl I downloaded.

How does this work. I really need the Tcl package struct. Is there a way to make Activestate Perl use the Activestate Tcl I have downloaded?


ActiveState Staff
Fri, 2011-03-25 13:15

You want to set the PERL_TCL_DL_PATH environment variable to direct Tkx to use a specific Tcl version. e.g.

set PERL_TCL_DL_PATH=C:\Tcl\bin\tcl85.dll

and go from there. This could also be set prior to 'use Tkx' or 'use Tcl' in code.

beeze455 | Tue, 2011-11-29 06:23

set PERL_TCL_DL_PATH=C:\Tcl\bin\tcl85.dll

Will make it work on your system, but when you compile it in perlapp and switch systems it does not work. I really hope I can compile this and run it from another system. Any suggestions?

ActiveState Staff
Tue, 2013-07-23 10:01

Perlapp is a special use case. Wrapping a stand-alone file requires binaries that have been prepared for that use case. Support for building such a specialized version is outside of the scope of these forums.