I get follwing error when installing

In the file included in linkstate/

linkstate/ls.h: In instantiation of ‘void LsMap<Key, T>::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/   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

Error Ns failed!

I am working on an NS2 project. Struck while installing please help


source to share

2 answers

Open the file (in my case it was ls.h) in the directory ns-2.xx/linkstate

. Change line 137, i.e. as follows from

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



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




just. you need to change "erase" to "this-> erase" in your linkstate / ls.h: 137: 58 file. then try installing again.



All Articles