Ls.cc error?
I get follwing error when installing
In the file included in 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
Error Ns failed!
I am working on an NS2 project. Struck while installing please help
+3
Vijnana Yogi
source
to share
2 answers
Open the ls.cc 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()); }
to
void eraseAll() {baseMap::erase(baseMap::begin(), baseMap::end()); }
+4
Afreen
source
to share
just. you need to change "erase" to "this-> erase" in your linkstate / ls.h: 137: 58 file. then try installing again.
+1
Karthick siva
source
to share