您可以构建缺少的依赖项tclsh
通过下载源代码分发https://prdownloads.sourceforge.net/tcl/tcl8420-src.zip https://prdownloads.sourceforge.net/tcl/tcl8420-src.zip。要编译源代码,您需要 C 编译器。我尝试了视觉工作室的社区版:https://visualstudio.microsoft.com/vs/ https://visualstudio.microsoft.com/vs/
-
单击下载社区版..
-
然后选择要安装的内容
-
然后点击“安装”
安装后,进入菜单“工具->命令行->开发人员命令提示符”并运行
nmake -f makefile.vc
来自win
提取的 Tcl 源代码分发的子文件夹(在我的计算机上,它位于C:\Users\Bruker\tcl\tcl8.4.20\win
)
以上nmake
命令创建一个新文件夹Release_VC13
带有可执行文件tclsh84.exe
。请注意,可执行文件的名称不是tclsh.exe
.
现在将可执行文件的文件夹添加到系统中PATH
环境变量:C:\Users\Bruker\tcl\tcl8.4.20\win\Release_VC13
,然后关闭命令提示符并再次重新打开以刷新路径设置。
尝试型tclsh84
,并且您应该得到一个 tcl shell 命令提示符,其前导是%
迅速的。然后输入exit
退出 tcl shell。
下一个问题是安装Tcl
使用 Strawberry Perl 的模块。首先尝试运行:
> cpan Tcl
[...]
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created VKON/Tcl-1.27.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.
问题是可执行文件没有被调用tclsh
but tclsh84
(往上看)。
我做的下一件事是下载源代码发行版Tcl
module:
> cpan -g Tcl
然后解压下载的文件Tcl-1.27.tar.gz
并更改为源代码分发目录。通过检查Makefile.PL
我发现Makefile.PL
接受命令行参数--tclsh
这给出了 tcl shell 命令的名称。所以我尝试:
> perl Makefile.PL --tclsh=tclsh84
现在效果很好。然后我尝试编译gmake
(随 Strawberry Perl 发行版一起提供):
> gmake
这也有效,但是运行gmake test
失败,并且还安装和测试模块:
> gmake install
> perl -MTcl -e1
failed dlopen(C:/Users/Bruker/tcl/tcl8.4.20/win/Release_VC13/tcl84.dll,...);
failed dlopen(./tcl84.dll,...);
failed dlopen(tcl84.dll,...);
trying dlopen(tcl89.dll,...)
trying dlopen(tcl88.dll,...)
trying dlopen(tcl87.dll,...)
trying dlopen(tcl86.dll,...)
trying dlopen(tcl85.dll,...)
trying dlopen(tcl84.dll,...)
trying dlopen(tcl83.dll,...)
trying dlopen(tcl82.dll,...)
trying dlopen(tcl81.dll,...)
trying dlopen(tcl80.dll,...)
failed all posible tcl vers 8.x from 9 down to 0 at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Failed to load Tcl dll! at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Unable to initialize Tcl at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Compilation failed in require.
BEGIN failed--compilation aborted.
我计划稍后再回到这个问题并进一步调查。