NS-3 on Cygwin in Win8

1,790 views
Skip to first unread message

Kaustubh

unread,
Oct 29, 2013, 5:46:11 AM10/29/13
to ns-3-...@googlegroups.com
Has anyone successfully installed Ns3 on cygwin in Win8 platform?
I am not keen to make my win8 system dual boot with ubuntu, just for the sake of ns3 installation.

Konstantinos

unread,
Oct 29, 2013, 6:34:19 AM10/29/13
to ns-3-...@googlegroups.com
As you can read in the ns-3 wiki, ns-3 ran on Cygwin, but it's not officially supported anymore.

Instead of making dual boot, you could make a virtual machine either with VMWare or VirtualBox.

Regards,
K.

Kaustubh

unread,
Oct 29, 2013, 9:20:18 AM10/29/13
to ns-3-...@googlegroups.com
Thank for the reply.....
Please post a link or some guidelines to make a virtual machine..as i am totally new to this term and also ns3.

Konstantinos

unread,
Oct 29, 2013, 9:39:46 AM10/29/13
to ns-3-...@googlegroups.com
These two are from NS-3 HowTo section

You can find the version of VirtualBox or VMware that will work for Win 8 and continue from there.

Tom Henderson

unread,
Oct 29, 2013, 12:48:16 PM10/29/13
to ns-3-...@googlegroups.com, Kaustubh
I have not tried cygwin on Windows 8, but recent cygwin on Windows 7 has
worked for me.

Please note also that there is some support for Visual Studio 2012; see
this wiki page:
https://www.nsnam.org/wiki/index.php/Ns-3_on_Visual_Studio_2012

- Tom

Kaustubh

unread,
Oct 30, 2013, 4:17:46 AM10/30/13
to ns-3-...@googlegroups.com
1) The vmware link   http://www.vmware.com/download/server/   has so many download options. What exactly shoul i download from those options?

2) Secondly, are vmware & virtual box both free-to-use tools? or do we need to purchase full versions. This is because, i could see buy now options on the above vmware link.

Kaustubh

unread,
Oct 30, 2013, 4:26:21 AM10/30/13
to ns-3-...@googlegroups.com, Kaustubh
@ Tom

Thanks for that link. Visual c++ sounds an interesting option. As my entire work will be related to OLSR , visuall c++ should be sufficient enough. 
Of all the unsupported modules, is anyone mandatory for olsr simulations?

Tom Henderson

unread,
Oct 30, 2013, 11:19:16 AM10/30/13
to ns-3-...@googlegroups.com, Kaustubh
On 10/30/2013 01:26 AM, Kaustubh wrote:
> @ Tom
>
> Thanks for that link. Visual c++ sounds an interesting option. As my
> entire work will be related to OLSR , visuall c++ should be sufficient
> enough.
> Of all the unsupported modules, is anyone mandatory for olsr simulations?
>

No unsupported modules are needed for OLSR simulation.

Kaustubh

unread,
Oct 30, 2013, 12:21:18 PM10/30/13
to ns-3-...@googlegroups.com, Kaustubh
Tom,

I tried installing ns 3 on visual expr 2013. When i clicked on 'build solution' it showed me a lot of errors. Finally the msg was 1 successfull, 33 failed.
What's the reason for this? Is it because i am using VE 2013 instead of 2012?

John Abraham

unread,
Oct 30, 2013, 12:22:28 PM10/30/13
to ns-3-...@googlegroups.com, Kaustubh
Yes, only 2012 is supported.


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/groups/opt_out.

Kaustubh

unread,
Oct 31, 2013, 9:35:31 AM10/31/13
to ns-3-...@googlegroups.com, Kaustubh
On VE2012, when i try to build ns3, i get following error, 35 times;
 
Error 1 error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 44 5 InstallHeaders

What's the solution to this?

John Abraham

unread,
Oct 31, 2013, 9:40:55 AM10/31/13
to ns-3-...@googlegroups.com, Kaustubh
Did you try the suggestion mentioned by the error?
Error 1 error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets

You probably have multiple VS installations.

John Abraham

unread,
Oct 31, 2013, 9:43:33 AM10/31/13
to ns-3-...@googlegroups.com, Kaustubh
the platform tool set v120 is still VS 2013. 
Did you clone again and try? your installation of VS 2012 still feels it has to use VS 2013

Kaustubh

unread,
Oct 31, 2013, 9:53:07 AM10/31/13
to ns-3-...@googlegroups.com, Kaustubh
i uninstalled VS2013 completely, and then installed VS2012. But i dont know whether some components of vs2013 are still present.
I even tried the suggestion mentioned, but the option 'update vcc projects ' does not exist. I have attached the screenshot of the errors i am getting.
Untitled.png

John Abraham

unread,
Oct 31, 2013, 9:54:42 AM10/31/13
to ns-3-...@googlegroups.com
did you clone the repository again? old elements of your previous build on 2013 may still exist if you have not

John Abraham

unread,
Oct 31, 2013, 10:01:42 AM10/31/13
to ns-3-...@googlegroups.com
also read

To change the project toolset

  1. In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Properties.

  2. In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.

  3. In the left pane of the dialog box, expand Configuration Properties and then select General.

  4. In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list. For example, if you want to compile with the Visual Studio 2010 toolset, select Visual Studio 2010 (v100).

  5. Choose the OK button.



    for Visual studio 2012 it is v110



Kaustubh

unread,
Oct 31, 2013, 10:38:26 AM10/31/13
to ns-3-...@googlegroups.com
This is what i did:
In solution explorer right click -> core -> properties -> config prop -> all config -> general > chnge platform toolset to v110
Then i tried to build again, but this tym it gave  me more no: of errors.
Do i need to apply VE 2012 update 3?
or should i re-download ns 3 repos again from mercurial?

sorry mate..i am testing ur patience...but this is all entirely new thing for me....

John Abraham

unread,
Oct 31, 2013, 11:02:02 AM10/31/13
to ns-3-...@googlegroups.com, ns-3-...@googlegroups.com
Yes clone again. 

Sent from my iPhone

Kaustubh

unread,
Nov 2, 2013, 1:59:59 AM11/2/13
to ns-3-...@googlegroups.com
done!! finally....thanks john..
i ran third.cc and got the desired result...

Do you have any tutorial or mannual on how to run simulations on VE? For running simulations, do i need to follow the same procedure as done with third.cc? What if i want to run example simulation from 'examples' or 'src' folder? Please explain..

John Abraham

unread,
Nov 2, 2013, 7:28:11 AM11/2/13
to ns-3-...@googlegroups.com, ns-3-...@googlegroups.com
all visual studio solutions have only one entry point function, so you have to replace third.cc and click build.
the instructions are on the same wiki page

Kaustubh

unread,
Nov 5, 2013, 9:28:35 AM11/5/13
to ns-3-...@googlegroups.com
As ns3 on VE does not support external libraries like gnuplot, so what is the alternative to that? I mean, if i want to view some graphs of the simulations, how to do that?

John Abraham

unread,
Nov 5, 2013, 9:40:33 AM11/5/13
to ns-3-...@googlegroups.com
actually it is not that it does not support external libraries.



if you can find the correct version of gnu plot etc for your windows version, install the software including headers and just add the include path ("Additional Include directories")for the headers on the properties page of any of the projects (lets say the "stats" project)

Review:


Ofcourse add the gnu plot related .cc and .h files found in the ns-3-dev/src/stats folder to the "stats" project.

Kaustubh

unread,
Nov 5, 2013, 10:02:14 AM11/5/13
to ns-3-...@googlegroups.com
thank for a prompt reply....
As i am gradually getting used to ns3...a couple of more queries

1) To test netanim, i ran couple of examples like wireless_animation, grid etc and got the respective .xml files. Now how to visualize these in netanim gui?
2) what are.pcap files and how to view them?

John Abraham

unread,
Nov 5, 2013, 10:06:42 AM11/5/13
to ns-3-...@googlegroups.com
pcap files (packet capture) can be read using "wireshark"

for netanim on windows you need Qt Creator

Kaustubh

unread,
Nov 6, 2013, 5:23:30 AM11/6/13
to ns-3-...@googlegroups.com
When i double click Netanim.pro, i get an error message that "cannot open C:\netanim\netanim.pro. The filename, directory name or volume label syntax is incorrect"

Alternatively,
I first opened Qt, then, open project -> netanim.pro, i get following message (see attachment)
Untitled.png

John Abraham

unread,
Nov 6, 2013, 12:03:39 PM11/6/13
to ns-3-...@googlegroups.com
You need to set the correct toolchain or Qt creator is unable to detect Visual Studio. Projects-> manage kits, should look something like the images below
1.png
2.png
3.png

John Abraham

unread,
Nov 6, 2013, 12:04:26 PM11/6/13
to ns-3-...@googlegroups.com
note Qt 5 is not yet supported

Kaustubh

unread,
Nov 7, 2013, 3:44:56 AM11/7/13
to ns-3-...@googlegroups.com
I have qt5.1.1. Is that a problem? or should i download Qt libraries 4.8.5 for Windows (VS 2010, 235 MB) .
I got smilar screenshots to yours, but i think there is some problem in the 1st one. please have a look. 
How to add a debugger? i couldnt find cdb.exe in windows kits folder.
Untitled.png
Untitled1.png
Untitled2.png

John Abraham

unread,
Nov 7, 2013, 7:42:31 AM11/7/13
to ns-3-...@googlegroups.com
unless you want to debug , you don't need cdb

Kaustubh

unread,
Nov 7, 2013, 11:19:19 AM11/7/13
to ns-3-...@googlegroups.com
Ok..so i did as per ur guidelines...now netanim.pro is opening with qt...but when i build it it gives me following errors (see attachment)
please assist...
Untitled.png

John Abraham

unread,
Nov 7, 2013, 11:46:41 AM11/7/13
to ns-3-...@googlegroups.com
Qt 5 is not supported yet and most likely thats whats happening
you need Qt libraries 4.8.5 for Windows (VS 2010, 235 MB) (Info)
and unfortunately you also need VS C++ 2010 express.

Kaustubh

unread,
Nov 9, 2013, 9:02:31 AM11/9/13
to ns-3-...@googlegroups.com
I downloaded vc 2010. To build qt 4.8.5 using nmake, it is taking almost 10hrs to build, and still not finished yet..
Does it take so much time? or am i doing something wrong?
Does qt 4.8.5 have a gui like qt5?

John Abraham

unread,
Nov 9, 2013, 9:04:20 AM11/9/13
to ns-3-...@googlegroups.com
oh no, don't build anything.. 
let me just send you the exe if I can

John Abraham

unread,
Nov 9, 2013, 12:00:29 PM11/9/13
to ns-3-...@googlegroups.com
Hi,
I tried making a version of NetAnim for qt5. Please clone
"hg clone http://code.nsnam.org/jabraham3/netanim-qt5"
Build it using Qt Creator with Qt 5 with VC 2012.
Use Release mode rather than debug mode, see attached pic

1.png

Kaustubh

unread,
Nov 9, 2013, 12:31:42 PM11/9/13
to ns-3-...@googlegroups.com
Its showing me 4 warning like...."some possible loss of data" ...but netanim exec file is opening..
thanks a ton...ur a gem, john
Reply all
Reply to author
Forward
0 new messages