HOWTO configure Eclipse with ns-3

From Nsnam
Revision as of 14:12, 30 August 2010 by Socket (Talk | contribs) (Configure Waf Builder)

Jump to: navigation, search

Configure Mercurial

  • First download eclipse IDE for C++ developers from
  • Install eclipse into you operating system
  • Install mercurial eclipse plugin:
  • We suppose that you already have mercurial installed on your machine
  • start eclipse, it will create a workspace directory NB:It is advised to use a different directory for the code say ~/src
  • clone the mercurial reppository: go to ~/src and execute hg clone ns3dev
  • create a new empty C++ project with your preferred name and the path is ~/src/ns3devt on
  • click right on the project and go to team->share project
  • click on next and click on use local hg and finish

You should have now your project configured with eclipse and be able to pull, update, view history, etc in eclipse. The next steps will allow you to configure, compile and run the code from eclipse.

Configure Waf Builder

Builder Settings Screenshot
Builder Behaviour Screenshot
  • Click right on the project and click on properties
  • Click on C/C++ build and configure the builder
  • Uncheck the box Use default build command
  • Uncheck the box Generate makefile automatically
  • Write ${workspace_loc:ns3dev}/waf in the build command
  • Make sure your build directory is the build directory in ns3dev (${workspace_loc:ns3dev}/build)
  • Click on the behaviour tab
  • Remove the `all` option in front of the build checkbox and write `build`
  • Now when you click on build you will be able to build the project using waf

Configure Debugger


Debugger main tab
Debugger environment tab