1) 下載:http://mirrors.neusoft.edu.cn/eclipse/oomph/epp/2020-03/R/eclipse-inst-linux64.tar.gz
解壓後,用這個包來聯網安裝,選擇C/C++,我安裝後版本是4.15.0 2020-3
2)配置,編譯一下:
按網上說法,要安裝一堆的依賴包,之後運行配置。
./waf configure --enable-examples --enable-tests --with-pybindgen=/000/ns3301/pybindgen-0.20.0 --with-openflow=/000/openflow --with-nsclick=/000/click --with-brite=/000/BRITE
然後編譯:
./waf build
3)eclipse打開項目:
新建項目---> 選擇空項目,瀏覽選擇路徑,確定。
4)配置:編譯環境
項目上右鍵,選擇property,選擇build,新建一個。其實,並不是用這個編譯的,可以跳過。
5) 設置運行環境:在菜單run--->External tools----->External Tools Configuration,彈出窗口,
新建:名字ns-waf,瀏覽路徑如圖:
--run "${string_prompt}",確定
最後選擇run,就可以運行了,運行彈出來的對話框中填入要運行的文件的名字就可以了,比如 first
6) 配置DEBUG,菜單 run------>debug configurations,
祝大家好運。