gpt4 book ai didi

ns2 - ls.cc 文件错误?

转载 作者:行者123 更新时间:2023-12-01 11:36:58 25 4
gpt4 key购买 nike

安装时出现以下错误

linkstate/ls.cc:67:0: 包含的文件中

linkstate/ls.h: In instantiation of ‘void LsMap<Key, T>::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:58: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
^
linkstate/ls.h:137:58: note: declarations in dependent base ‘std::map<int, LsIdSeq, std::less<int>, std::allocator<std::pair<const int, LsIdSeq> > >’ are not found by unqualified lookup
linkstate/ls.h:137:58: note: use ‘this->erase’ instead

make: *** [linkstate/ls.o] 错误 1

Ns make 失败!

我正在从事 NS2 项目。安装时被击中请帮忙

最佳答案

打开 ns-2.xx/linkstate 目录中的文件 ls.cc(在我的例子中,它是 ls.h)。更改第 137 行,即。如下来自

    void eraseAll() { erase(baseMap::begin(), baseMap::end()); }

    void eraseAll() {baseMap::erase(baseMap::begin(), baseMap::end()); }

关于ns2 - ls.cc 文件错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25889762/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com