[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Building ns-3

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,

  ~/repos/ns-3-dev >./waf -d debug configure
  Checking for program g++                 : ok /usr/bin/g++
  Checking for compiler version            : ok Version 4.1.2
  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 header stdlib.h                   : ok
  Checking for header stdlib.h                   : ok
  Checking for header signal.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 package goocanvas gthread-2.0      : not found
  Checking for program diff                       : ok /usr/bin/diff
  Configuration finished successfully; project is now ready to build.
  ~/repos/ns-3-dev >

The build system is now configured and you can build the debug versions of the ns-3 programs by simply typing,

  ./waf

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 July, 20 2008 using texi2html 1.76.