NS-3 (NS3) And Eclipse (Part I)

In: My notes|NS-3

3 Feb 2010

This is a short explanation on how I added NS-3 (version 3.6) to Eclipse (Galileo). I use first part from NS-3 Wiki

Adding Mercurial to Eclipse

First download eclipse IDE for C++ developers from http://www.eclipse.org
* Install eclipse into you operating system
* Install mercurial eclipse plugin:
– Go to help->software update
– Click on available software
– Click on add a site
– Add http://www.vectrace.com/eclipse-update/ taken from http://www.vectrace.com/mercurialeclipse/ then click on mercurialeclipse and check the box and click on install
* We suppose that you already have mercurial installed on your machine

Making a Clone of NS-3 in Eclipse

After you that you need to add the NS-3 from the repository:

Select: New -> Other, and it would be like picture below:

Eclipse mercurial after new project

Then press next. now you need to enter “Repository location URL” that is: http://code.nsnam.org/ns-3-dev

in case you want to have different versions of the NS-3 you need to define the “Clone directory name”, in the figure below I chose ns-3.7-dev

Clone the NS-3 to workspace

Now you just need to wait for the project files be cloned. then you will find a copy of the project you wanted like below:

A clone made of NS-3.7-dev in clipse

Since the folder is not know as a C++ project it is necessary to be converted to so right click on project name and select: new -> convert to a C/C++ project the rest of settings should be same as picture below:

Convert to C++ project

Configuring the Build system

We know that build system for NS-3 is Waf so we need to change the build configuration from build/make to Waf. so right click on project and select the properties then choose the “C/C++ Build”.

In the “Builder setup” choose “External Builder

Remove the check from “Use default build command

change “Build command” to ${workspace_loc:/ns-3.7-dev/waf}

Behaviour setting

in Behavior tab, clear both “Build on resource save (Auto save)” and “Build (Incremental build)



Now all you need to do is to push  apply and Ok. you will notice that Waf starts to build the whole project.

UPDATE: Here are some good videos By Reza P. Rezavni on how to have NS-3 on OpenSUSE


8 Responses to NS-3 (NS3) And Eclipse (Part I)


André Cardote

February 8th, 2010 at 10:35 pm

Can you debug using eclipse this way?



February 17th, 2010 at 3:01 pm

Well I have not tried it yet



March 25th, 2010 at 4:37 pm

I have tryed but cant work! Having no “clone” project come out!



October 6th, 2010 at 9:16 pm

It works perfectly !!!



July 8th, 2013 at 12:04 pm

You can see my video about installing and configuring Eclipse on ns-3 in this link:

or this:

Good luck



July 8th, 2013 at 12:19 pm

Thanks for the great video Reza 🙂



January 9th, 2014 at 11:50 am

i am facing problem in configuring waf
it is generating error cannot run or path not found



May 30th, 2014 at 5:47 am

I Had a problem in installing network simulation tools
I solved that and shared them on my blog
Also, I created several videos in Installing ns-3 on Suse (OpenSuse) Linux,

You can my see videos at : http://www.cbt4all.com/

Install NS-3.16 on OpenSuse-Part1-Install OpenSuse On VM-Ware

Install NS-3.16 on OpenSuse-Part2-Install Prerequirments Package for NS-3.16

Install NS-3.16 on OpenSuse-Part3-Install NS-3.16 and Run Example

Install and configure Eclipse IDE on ns-3

I hope it is useful

Comment Form

About this blog

In addition to a daily blog I will try to add our works in wireless network and data communication projects for our courses here


    Autumn yellow leavesAutumn yellow leavesAutumn yellow leavesAutumn yellow leavesAutumn yellow leaves and stairsAutumn yellow leaves
  • Linus: It says 'constructor' was not declared in this scope. What #includes is necessary for this code? [...]
  • padmanabham: how can create end node ie (RFD) in topology. please help me...... thank you................. [...]
  • padmanabham: i am doing M.tech project on lowrate WPAN (Zigbee) using star,cluster tree and mesh topology i can [...]
  • Layla Wilson: At the least it's more educational than one of our reality TV stars, kim who? Joey what? [...]
  • san ramon website design: Right here is the perfect web site for anybody who wants to find out about this topic. You realize [...]