[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
We use Waf to build the ns-3
project. The first thing you will need
to do is to configure the build. For reasons that will become clear later,
we are going to work with debug builds in the tutorial. To explain to Waf
that it should do debug builds you will need to execute the following command,
./waf -d debug configure
This runs Waf out of the local directory (which is provided as a convenience for you). As the build system checks for various dependencies you should see output that looks similar to the following,
Checking for program g++ : ok /usr/bin/g++ Checking for compiler version : ok Version 4.0.1 Checking for program cpp : ok /usr/bin/cpp Checking for program ar : ok /usr/bin/ar Checking for program ranlib : ok /usr/bin/ranlib Checking for compiler could create programs : ok Checking for compiler could create shared libs : ok Checking for compiler could create static libs : ok Checking for flags -O2 -DNDEBUG : ok Checking for flags -g -DDEBUG : ok Checking for flags -g3 -O0 -DDEBUG : ok Checking for flags -Wall : ok Checking for g++ : ok Checking for -Wno-error=deprecated-declarations compilation flag support : no Checking for header stdlib.h : ok Checking for header stdlib.h : ok Checking for header signal.h : ok Checking for library rt : not found Checking for header pthread.h : ok Checking for high precision time implementation: 128-bit integer Checking for header stdint.h : ok Checking for header inttypes.h : ok Checking for header sys/inttypes.h : not found Checking for package gtk+-2.0 >= 2.12 : not found Checking for library sqlite3 : ok Checking for package goocanvas gthread-2.0 : not found Checking for program python : ok /usr/local/bin/python Checking for Python version >= 2.3 : ok 2.4.3 Checking for library python2.4 : not found Checking for library python2.4 : not found Checking for library python24 : not found Checking for program python2.4-config : not found Checking for header Python.h : not found Checking for program diff : ok /usr/bin/diff Checking for program hg : ok /opt/local/bin/hg ---- Summary of optional NS-3 features: Threading Primitives : enabled Real Time Simulator : enabled GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found) SQlite stats data output : enabled Network Simulation Cradle : not enabled (--enable-nsc configure option not given) Python Bindings : not enabled (Python development headers not found.) Configuration finished successfully; project is now ready to build.
Note the trailing portion of the above output. Some ns-3 options are not enabled by default or require support from the underlying system. For instance, to enable Python bindings, Python development headers must be installed on the host machine, and they were not found in the above example, so Python scripting will not be supported in the resulting build. For this tutorial, we will focus on the non-optional pieces of ns-3.
The build system is now configured and you can build the debug versions of
the ns-3
programs by simply typing,
./waf
(Hint: if you have a multicore machine, use the "-j JOBS" option to speed up your build, where JOBS is the number of cores) You will see many Waf status messages displayed as the system compiles. The most important is the last one:
Compilation finished successfully
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on December, 19 2008 using texi2html 1.78.