首先准备环境
1 |
sudo apt-get install gcc g++ python python-dev qt4-dev-tools mercurial bzr cmake libc6-dev libc6-dev-i386 g++-multilib gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison libfl-dev tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev vtun lxc libboost-signals-dev libboost-filesystem-dev |
然后Build
1 |
./build.py --enable-examples --enable-tests |
然后(可选)waf设置参数
1 |
./waf clean |
上面这句话会清空前面的生成
1 |
./waf --build-profile=optimized --enable-examples --enable-tests configure |
配置生成,以生成optimized的,带有examples和tests的ns-3
1 |
./waf |
生成。