Pages

2013年3月29日 星期五

安裝NS2.35 失敗問題 "Ns make failed!"

我在安裝NS2.35 失敗 一直產生此訊息:


In file included from linkstate/ls.cc:67:0:
linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!

後來找到解決之道:

步驟:

  1. 到 ns-allinone-2.35/ns-2.35/linkstate/  資料夾
  2. 開啟ls.h 檔案
          第137行中, void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
           修改成 void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
     3.  再一次執行指令:./install  

經過漫長的等待~~   完成!!!

參考自:文章

沒有留言:

張貼留言

 
 
Blogger Templates