in reply to Re^3: macOS tcl::pTk packing Tcl
in thread macOS tcl::pTk packing Tcl

Thank you Anonymous Monk, but I do not know what I expressed wrong in my post. I do NOT know what to specify. On macOS there are not dll, by the way. I am trying just by trial and error to put some path in frameworkpath, but as I am moving blindly (I really do not find any info on the Web), it does not work and always fires something like

Frameworks/Tcl.Frameworkdlopen(Frameworks/Tcl.Framework, 10): no suita +ble image found. Did find: Frameworks/Tcl.Framework: not a file

I am also experimenting with Tclkit (for example from http://kitcreator.rkeene.org/fossil/index (it should be a single file, maybe easier for portability), but in lack of clear instructions, I fail.

I do not understand your second question. macOS comes with a preinstalled version of Tcl (8.5). I installed a second version (ActiveTcl 8.6) in order to experiment with switching between different versions and not let the modules Tcl/Tcl::pTk choose one without my control. As you can see, I am a bit confused about the whole

.

UPDATE

With the following BEGIN statement

BEGIN { my $frameworkpath = "Frameworks/Tcl.Framework/Versions/8.5/Tcl"; print $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath; }

I've been able to link my script to a specific Tcl installation (in my case the pre-installed Tcl on my Mac). Without the BEGIN it is linked to the ActiveTcl I installed. Note the I specify no dll, but the Tcl executable. I start to see some light at the end of the tunnel...

UPDATE 2

The above BEGIN code works only partially, as the Tk library used is always the same one... also, no step forward and almost ready to give up