windows执行tcl脚本报错 Bad exe format. Possibly a 32/64-bit mismatch.

在cmd环境下尝试运行`tclshtc_auto.tcl`时,遇到了错误,提示无法加载Spirent Automation Internal Utility Library,具体原因是`sTcl.dll`库文件格式错误,可能是32/64位不匹配的问题。脚本引用了`SpirentTestCenter.tcl`并尝试配置日志和机框IP等设置。
摘要由CSDN通过智能技术生成

cmd下执行tclsh tc_auto.tcl

报错原码

PS E:\liqiang\epon_script_fullmask\es3> tclsh tc_auto.tcl
Error Occured while loading the Spirent Automation Internal Utility Library (couldn't load library "C:/Program Files (x86)/Spirent Communications/Spirent TestCenter 4.73/Spirent TestCenter Application/sTcl.dll": Bad exe format. Possibly a 32/64-bit mismatch.).
invalid command name "stc_int::salGet"
    while executing
"stc_int::salGet $handle $args "
    (procedure "stc::get" line 2)
    invoked from within
"stc::get automationoptions -suppressTclErrors"
    (procedure "wrap_proc" line 11)
    invoked from within
"wrap_proc ::stc::perform { commandName args } {
    set result [ stc_int::salPerform $commandName $args ]
    if { [llength $result] == 1 } { join $re..."
    (file "C:\Program Files (x86)\Spirent Communications\Spirent TestCenter 4.73\Spirent TestCenter Application\SpirentTestCenter.tcl" line 136)
    invoked from within
"source {C:\Program Files (x86)\Spirent Communications\Spirent TestCenter 4.73\Spirent TestCenter Application\SpirentTestCenter.tcl}"
    (file "tc_auto.tcl" line 10)
PS E:\liqiang\epon_script_fullmask\es3>

tcl脚本部分源码

#!/bin/sh
# aTemplate.tcl \
exec tclsh "$0" ${1+"$@"}
#-----------------------------------------------------
#
#
#-----------------------------------------------------

#引用STC API ,SpirentTestCenter.tcl的路径
source {C:\Program Files (x86)\Spirent Communications\Spirent TestCenter 4.73\Spirent TestCenter Application\SpirentTestCenter.tcl}

#开启日志,-logTo :日志保存路径 ,使用stdout为标准输出;  -loglevel : 可选 DEBUG、 INFO 、WARN 和 ERROR 四种;
stc::config automationoptions -logTo "aTemplateLog.txt" -logLevel DEBUG

#配置机框Ip 槽位 端口号

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值