【发布时间】:2016-02-09 07:38:28
【问题描述】:
在 Windows 7 上,tcl 8.6.4。
我的 repo.tcl 和 region.tcl 文件都在 c:\sites\vive
repo 是一个包:
package provide repo 1.0
namespace eval ::repo {}
namespace eval ::repo::create{}
proc ::repo::create {} {...} ...
region.tcl 想要访问 repo.tcl 中的 procs,所以它看起来像这样:
#source ./repo.tcl <---------old method, want to replace with package require
lappend auto_path [pwd] ;#<--puts c:\sites\vive in the autopath so package can find it.
package require repo 1.0 ;#<--tried this with out version number as well. same result.
::repo::create
...
我总是收到这个错误:
找不到包 repo 1.0
这两个网站都建议我使用 lappend auto_path https://unix.stackexchange.com/questions/44992/package-require-xxxx-tcl Can't find package BLT
我做错了什么?谢谢!
【问题讨论】:
-
我什至试过:set auto_path "$auto_path [pwd]" 给了我同样的结果