进入文件夹
cd [size=0.9em]ns-allinone-2.35
[size=0.9em]
[size=0.9em]sudo ./install
报错1
[size=0.9em]linkstate/ls.cc:396:28: required from here
[size=0.9em]linkstate/ls.h:137:25: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
[size=0.9em] void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
[size=0.9em] ^
[size=0.9em]linkstate/ls.h:137:25: 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
[size=0.9em]linkstate/ls.h:137:25: note: use ‘this->erase’ instead
[size=0.9em]Makefile:93: recipe for target 'linkstate/ls.o' failed
[size=0.9em]make: *** [linkstate/ls.o] Error 1
[size=0.9em]Ns make failed!
[size=0.9em]See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Open the file ls.cc (in my case, it was ls.h) in [backcolor=var(--black-200)]ns-2.xx/linkstate directory. Change the 137th line ie. as follows from