Re: Problems with Tkx in par package

[email protected] (Roderich Schupp)
Newsgroups perl.par
Message-ID <CAC9r9zZBrRBMof1dWHinvRTKePjzMCZ_0eQFMhJjgS0wN9C8PA@mail.gmail.com>
On Mon, Sep 21, 2015 at 5:26 AM, Kevin Walzer <[email protected]> wrote:

> These flags seem to be ignored.


Same behaviour as in the unpacked script: temporarily rename the top level
directory of your Tcl installation and run your script - it won't work, no
matter what PERL_TCL_DL_PATH is set to.
The reason is that the Perl "glue" DLL .../auto/Tcl/Tcl.xs.dll is linked
against the "real" tcl86.dll.

pp -x  -g -a "iconic_stroke.ttf;script/iconic_stroke.ttf" -a
> "C:/Tcl;script/Tcl" -a "libs;script/Tcl/applibs"  filemorph.pl -o
> FileMorph.exe
>

Don't use -a to pack DLLs, it won't work. Instead use -l (assuming these
DLLs can be found via PATH at pack time):

-l zlib1.dll -l tcl86.dll -l tk86.dll

This will solve your DLL problem, but then Tcl will complain that it can't
find init.tcl.
Given your pp command it should have been extracted to
<cache-dir>/inc/script/Tcl/lib/tcl8.6/init.tcl
so you might try to start your script with

BEGIN { $ENV{TCL_LIBRARY} = "$ENV{PAR_TEMP}/inc/script/Tcl/lib/tcl8.6" }
use Tkx;
...

But that didn't work for me, apparently because $ENV{foo} set from Perl
isn't seen by $env(foo) from Tcl.

Cheers, Roderich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.