安装时我遇到了错误
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] Error 1
Ns失败了!
我正在研究NS2项目。对安装感到震惊 请帮忙
答案 0 :(得分:4)
在ns-2.xx/linkstate
目录中打开文件ls.cc(在我的例子中,它是ls.h)。改变第137行即。如下
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
到
void eraseAll() {baseMap::erase(baseMap::begin(), baseMap::end()); }
答案 1 :(得分:1)