Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Tk vs Tcl::pTk speed image

by Anonymous Monk
on May 17, 2018 at 17:24 UTC ( #1214766=note: print w/replies, xml ) Need Help??

in reply to Tk vs Tcl::pTk speed image

I am still fighting with this: if I point to a Tcl installation different to the ActivePerl Tkkit.dll, I get an error message:

#!/usr/bin/perl BEGIN { #my $frameworkpath = "C:/tkkit.dll";#If I use this, it works my $frameworkpath = "C:/ActiveTcl/bin/tk86t.dll"; print $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath; } use strict; use warnings; use Tcl::pTk; my $int = new Tcl::pTk; $int->Eval(<<'EOS'); # pure-tcl code to create widgets (e.g. generated by some GUI builder) text .e ## .e insert end "tcl_version $tcl_version\n" .e insert end "tcl_patchLevel $tcl_patchLevel\n" .e insert end "tk_version $tk_version\n" .e insert end "tk_patchLevel $tk_patchLevel\n" .e insert end "tk_library $tk_library\n" pack .e EOS my $e = $int->widget('.e'); # get .e entry into play $e->insert( "end", " Tcl::pTk $Tcl::pTk::VERSION Tcl $Tcl::VERSION \$^V $^V \$] $] "); $int->MainLoop;


NpLoadLibrary: could not find Tcl library at 'C:/ActiveTcl/bin/tk86t.d +ll' at C:/Perl/site/lib/ line 114. Failed to load Tcl dll! at C:/Perl/site/lib/ line 114. Unable to initialize Tcl at C:/Perl/site/lib/ line 114. Compilation failed in require at C:/Perl/site/lib/Tcl/ line 6. BEGIN failed--compilation aborted at C:/Perl/site/lib/Tcl/ line +6. Compilation failed in require at .\ line 10. BEGIN failed--compilation aborted at .\ line 10.

What am I doing wrong?

Replies are listed 'Best First'.
Re^2: Tk vs Tcl::pTk speed image
by Anonymous Monk on May 18, 2018 at 02:39 UTC

    What am I doing wrong?

    You forgot to recompile/reinstall against the 8.6 version of Tcl. You can't simply point at the newer dll when its expecting the old one.

      thank you. I am starting to grasp the "behind the scenes"... However, I stillave problems in operationalizing it: in the module documentation I read:

      Second method Copy installed Tcl/Tk binaries to some location, then install Perl mod +ule Tcl with a special action to make know of this location. This appro +ach makes sure that only chosen Tcl installation is used.

      No mention however how to accomplish it. Google doesn't help too. I am surely not very fit in this kind of things, but a bit more documentation would help. So, I again would very much appreciate any suggestion tries to be helpful by taking non standard arguments ( not ExtUtils::MakeMaker )
        GetOptions("tclsh=s", \$tclsh, # Use this tclsh executable as +a # base to find the lib info nee +ded "tclconfig=s", \$tclconfig, # Use the specified Tcl config file # instead of basing the values +on # the tclsh exe found "buildspec", \$buildspec, # Used with --tclconfig, use the # build (instead of install) va +lues # for determining lib info "usestubs!", \$usestubs, # we want to use the Tcl stubs # mechanism by default "library=s", \$libpath, # Use this specific Tcl library "include=s", \$incpath, # Use this specific include path "define=s", \$defs, # Use this specific set of defines ) || _die <<EOT; Usage: perl Makefile.PL [--tclsh <path>] [--tclconfig <path>] [--buildspec] [--nousestubs] [<makemaker opts> +...] or for expert compilation: perl --library=-l/path/to/tcl(stub).a --include=-I/path/to/tcl/ +include --define="-DLIB_RUNTIME_DIR=... -DTCL_LIB_FILE=..." EOT

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214766]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2020-12-01 00:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found