NS3使用手册

安装依赖

sudo apt-get install gcc g++ python python python-dev mercurial bzr valgrind gsl-bin libgsl-dev libgsl2 flex bison libfl-dev tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify doxygen graphviz imagemagick python-sphinx dia python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev libboost-signals-dev libboost-filesystem-dev

NS3 build

./waf -d debug --enable-examples --enable-tests configure --disable-werror 

在新加的一个CC文件里面,最好在using namespcae ns3;前面添加一个define,具体如下:

NS_LOG_COMPONENT_DEFINE("Myapp");
using namespace ns3;

NS3 调试教程

https://www.nsnam.org/support/faq/running-scripts/

NS3 多个文件

https://www.nsnam.org/support/faq/writing-scripts/

添加第三方库

使用动态连接库的方式添加第三方库
-Wl, --no-as-needed修改为-Wl, as-needed
http://www.mehic.info/2016/04/installing-and-crypto-libcryptopp-with-ns3/
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

安装NS3-GYM

参考:https://apps.nsnam.org/app/ns3-gym/

参考代码

https://github.com/caiqiqi/NS3-dev/blob/develop-2016_10_3_meet_gilani/goal-topo.cc
编译教程:https://www.jianshu.com/p/2c6c38ebe936

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值