標籤:des style blog http color get
安裝ns3的一系列包,指令碼如下:
#!/bin/sh
sudo apt-get install gcc g++ python python-pygccxml
sudo apt-get install gcc g++ python python-dev
sudo apt-get install mercurial
sudo apt-get install bzr
sudo apt-get install gdb valgrind
sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl
sudo apt-get install flex bison libfl-dev
sudo apt-get install tcpdump
sudo apt-get install sqlite sqlite3 libsqlite3-dev
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install vtun lxc
sudo apt-get install uncrustify
sudo apt-get install doxygen graphviz imagemagick
sudo apt-get install texlive texlive-extra-utils texlive-latex-extra
sudo apt-get install python-sphinx dia
sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev
sudo apt-get install libboost-signals-dev libboost-filesystem-dev
sudo apt-get install python-gnome2 python-gnomedesktop python-rsvg
sudo apt-get install ipython
sudo apt-get install qt4-dev-tools
sudo apt-get install gnuplot
sudo apt-get install wireshark*
在eclipse中配置ns3
Help->"Install New Software..."輸入網站,全選。
http://download.eclipse.org/tools/cdt/releases/kepler
Import匯入項目之後,右擊項目,設定,
C/C++ Builder的Builder Settings標籤中:
去掉“Use default build command”和“Generate Makefile automatically”前面的勾
設定Build command: ${workspace_loc:/ns-3.19/waf}
設定Build directory: ${workspace_loc:/ns-3.19//build}
C/C++ Builder的Behaviour標籤中:
全選Workbench Build Behavior中的複選框都選上,前2個值為空白,最後一個是clean。
設定eclipse執行程式使用外部工具
Run->External Tools->Externel tools Configurations,在Program中右鍵選擇New,name可以設定為ns3-waf-3.19,在location中設定${workspace_loc:/ns-3.19/waf},在working directory 中設定${workspace_loc:/ns-3.19},argument中設定為--run "${string_prompt}"。
最後單擊run選擇程式,可以選擇scratch-simulator來執行模擬。