我已经在Ubuntu22.04.1中安装了NS-2.35。我正在运行一个TCL代码(它在我朋友的机器上运行得很好),但是我得到了以下错误:
num_nodes is set 101
INITIALIZE THE LIST xListHead
ns: _o1096 Public:
(_o1096 cmd line 1)
invoked from within
"_o1096 cmd Public"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o1096" line 2)
(SplitObject unknown line 2)
invoked from within
"_o1096 Public"我的主tcl文件没有Public关键字。但是,主文件加载另一个文件,其中我将我的节点划分为三种类型:公共、私有和政府。
$ns at 0.0 "[$n49 set ragent_] Public"
#$ns at 0.0 "[$n38 set ragent_] Private"
$ns at 0.0 "[$n59 set ragent_] Govt"我有29个公共节点:
$ns at 0.0 "[$n1 set ragent_] Public"
$ns at 0.0 "[$n2 set ragent_] Public"
$ns at 0.0 "[$n3 set ragent_] Public"26个人:
$ns at 0.0 "[$n30 set ragent_] Private"
$ns at 0.0 "[$n31 set ragent_] Private"
$ns at 0.0 "[$n32 set ragent_] Private"同样,2政府。节点:
$ns at 0.0 "[$n58 set ragent_] Govt"
$ns at 0.0 "[$n59 set ragent_] Govt"但错误仅存在于Public类型中。为什么会这样呢?如何解决此错误?
发布于 2022-09-15 19:40:37
好吧。我终于找到了一个解决方案。问题在于我如何运行这段代码。更新AODV和公用文件夹文件后,我必须使用以下命令重新编译源代码:
> ./configure
> make clean
> make
> sudo make install这对我有用,我希望它也能帮助到其他人。
https://stackoverflow.com/questions/73705276
复制相似问题