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)

Behaviour setting

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

No related posts.

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

Avatar

André Cardote

February 8th, 2010 at 10:35 pm

Can you debug using eclipse this way?

Avatar

Arash

February 17th, 2010 at 3:01 pm

Well I have not tried it yet

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

Photostream

    IMG_0256IMG_0176IMG_0164IMG_0162IMG_0151IMG_0149

RSSFollow me on twitter