找不到包 BLT [英] Can't find package BLT

查看:55
本文介绍了找不到包 BLT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在让 BLT 与 Tcl/TK 一起工作时遇到问题.我为 TCL/TK 安装了 BLT 库,但是当我尝试运行 tcl 程序来绘制图形时,它一直给我一个错误,说找不到包 BLT".在我的程序中,我已经包含了:

I am having a problem of getting BLT to work with Tcl/TK. I installed BLT library for TCL/TK but when i try running a tcl program to plot a graph, it keeps giving me an error saying "can't find package BLT". In my program I have already included:

package require BLT

我还在 32 位 Windows 操作系统上将 BLT 部分附加到我的环境变量中,但它仍然不起作用.

I also appended the BLT part to my environmental variable on my windows operating system 32 bit but it still doesn't work.

请问我需要做什么?

推荐答案

要使该工作正常进行,包含 BLT 包的目录需要位于 auto_path 上.具体来说,包含包含 pkgIndex.tcl 文件的目录的目录(所以 /foo/bar 如果你把包放在它的索引文件是 /foo/bar/BLT/pkgIndex.tcl) 需要在那里(因为 Tcl 在列出的目录中查找并且一个级别).该全局变量是一个 Tcl 搜索位置列表;您可能需要输入:

To make that work, the directory containing the BLT package needs to be on the auto_path. Specifically, the directory that contains the directory containing the pkgIndex.tcl file (so /foo/bar if you put the package so that it's index file is /foo/bar/BLT/pkgIndex.tcl) needs to be there (as Tcl looks in the directories listed and one level down). That global variable is a Tcl list of places to search; you might need to put:

lappend auto_path /foo/bar

在脚本的开头,在任何 package require 语句之前.(好的,将 /foo/bar 切换为实际路径,如果目录/路径元素中有空格,则使用大括号将其括起来,按照通常的 Tcl 引用规则.)

at the beginning of your script, prior to any package require statements. (OK, switch /foo/bar for the real path, and use braces around it if the directory/path-element has spaces in it, as per usual Tcl quoting rules.)

这篇关于找不到包 BLT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆