3

While installing I am getting follwing error

In file included from 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 make failed!

I am working on a NS2 project . Got struck at installation please help

gprathour
  • 14,813
  • 5
  • 66
  • 90
Vijnana Yogi
  • 112
  • 1
  • 1
  • 8

2 Answers2

4

Open the file ls.cc (in my case, it was ls.h) in ns-2.xx/linkstate directory. Change the 137th line ie. as follows from

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

to

    void eraseAll() {baseMap::erase(baseMap::begin(), baseMap::end()); }
Afreen
  • 125
  • 7
  • I prefer this solution: using basemap instead of 'this' (that is also suggested by the build output) looks better in this context. – F.I.V Oct 27 '17 at 17:54
1

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

Karthick Siva
  • 314
  • 2
  • 11