ls.cc 文件中有错误?

Vij*_*ogi 3 ns2

安装时出现以下错误

\n\n

在文件中包含来自linkstate/ls.cc:67:0:

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

make: *** [linkstate/ls.o] Error 1

\n\n

NS make 失败!

\n\n

我正在从事 NS2 项目。安装时遇到问题\n请帮忙

\n

Afr*_*een 5

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

    void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
Run Code Online (Sandbox Code Playgroud)

    void eraseAll() {baseMap::erase(baseMap::begin(), baseMap::end()); }
Run Code Online (Sandbox Code Playgroud)