ns-3 on Windows Visual Studio 2012

773 views
Skip to first unread message

John Abraham

unread,
Oct 2, 2013, 11:58:16 AM10/2/13
to ns-3-...@googlegroups.com, NS developers mailing list
Hi,
We want to announce the availability of ns-3 integrated with Visual Studio 2012. It is based on the ns-3.18 code.

http://www.nsnam.org/wiki/index.php/Ns-3_on_Visual_Studio_2012


This is a limited edition, as this continues to be a largely experimental project. It allows long-time windows users and programmers to experience ns-3 without switching to any Linux environment. It features
1. Instant IDE integration (Visual Studio 2012 express Free edition)
2. IDE integration also means we can use GUI debuggers.
3. No dependency on waf (configuring build options such as linker flags, path to additional headers, adding new source files, specifying module build order are done via mouse-clicks and/or drag and drop)
4. The IDE solution, is compact and has all components required to get basic simulation going.

Caveats:
1. No python support is available.
2. Most essential modules of the simulator free of unix-centric code are included
3. Any module that significantly relies on 3rd party libraries such as gnuplot, sql, python are excluded in this edition. However, it is not very difficult to add them at a later point in time, if you can find the right windows version for these libraries.
4. Code directly/indirectly interacting with pthreads is not supported yet.

Unicast any issues to me.

Thanks
John Abraham
Brian Swenson

Purnob Hossain

unread,
Dec 17, 2013, 1:27:07 PM12/17/13
to ns-3-...@googlegroups.com, NS developers mailing list
is there anyway i can visualize the ns3 program in windows ? 

John Abraham

unread,
Dec 18, 2013, 8:44:46 AM12/18/13
to ns-3-...@googlegroups.com, NS developers mailing list
here is a thread discussing it
you need the qt5 compatible edition of NetAnim and also install qt5 for vs-2012


On Tue, Dec 17, 2013 at 10:27 AM, Purnob Hossain <pur...@gmail.com> wrote:
is there anyway i can visualize the ns3 program in windows ? 

--
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.

Ting-Yu Mu

unread,
Feb 26, 2015, 3:21:08 PM2/26/15
to ns-3-...@googlegroups.com, ns-dev...@isi.edu
Hi, thank you all for making ns-3 available on Visual Studio 2012. Do you know how to enable openflow module within Visual Studio 2012?

John Abraham

unread,
Feb 27, 2015, 11:40:25 AM2/27/15
to ns-3-...@googlegroups.com
unfortunately I lost my windows Virtual machine. hope to get it restored and try to answer your question.

--
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/d/optout.

John Abraham

unread,
Feb 27, 2015, 9:33:59 PM2/27/15
to ns-3-...@googlegroups.com
you might have to consider openflow as a new module and try to follow the instructions at

https://www.nsnam.org/wiki/index.php/Ns-3_on_Visual_Studio_2012#Adding_a_new_module

or just try dragging and dropping the openflow *.cc and *.h files into the "main" project. Try to build it and see what compilation errors you get.

Doaa Terri

unread,
Jul 28, 2015, 11:29:34 AM7/28/15
to ns-3-users, ns-dev...@isi.edu, john.ab...@gmail.com
Hi John 

I have an inquiry about the simulation, I used ns3 with VS 2012 

The problem is that the simulation is very slow!! however my script still simple 

Can you help me in this issue 

Thanks in advance 

John Abraham

unread,
Jul 28, 2015, 2:24:04 PM7/28/15
to Doaa Terri, ns-3-users, NS developers mailing list
hmm. The best I can think of is to try to build it in release mode. I have never tried it though.

John Abraham

unread,
Aug 1, 2015, 7:13:53 PM8/1/15
to Doaa Terri, ns-3-users, NS developers mailing list
Hi,

I just checked in the code to switch to "Release" mode.

Please clone http://code.nsnam.org/jabraham3/ns-3-win2
Open the solution--> Build-->Configuration Manager-->Active Solutions Configuration --> Release. And then rebuild.

Not sure if it helps improve the time for execution, but it enables some of the optimizations that Visual Studio recommends.

1. Did you measure the time for a given program on Windows vs another, using the same system configuration?


john







Brian Swenson

unread,
Aug 1, 2015, 10:43:15 PM8/1/15
to John Abraham, Doaa Terri, NS developers mailing list, ns-3-users
Hey

Sorry to jump in late. Terri, I don't think I received the original script that you're running. At least I can't find it; too much email. Can you send it to me? I'd like to run it and look at profiling.

Thanks
Brian

Doaa Terri

unread,
Aug 3, 2015, 4:01:26 AM8/3/15
to ns-3-users, john.ab...@gmail.com, doaa...@gmail.com, ns-dev...@isi.edu
Hi all
Thanks a lot John, I will try it and see if this will improve the execution time. I have just tried my script on windows. 
Brian, kindly find the attached script. Thanks a lot for your help!

Regards
ex.cpp

Doaa Terri

unread,
Aug 11, 2015, 5:25:20 PM8/11/15
to ns-3-users
Hi John 
I have a question. How can I write the logging into a file. I searched the mail and found this 
But, How can I do this when I run the script in VS because I think that the command is for linux basis. 
Thanks

John Abraham

unread,
Aug 11, 2015, 8:14:16 PM8/11/15
to ns-3-...@googlegroups.com
something like

ns-3-win2\windows\ns-3-dev\Debug>main.exe 2> a.txt



Doaa

unread,
Nov 23, 2015, 2:24:28 AM11/23/15
to ns-3-users
Hi John 

I have an inquiry regarding NS-3 on VS 2012, it is mentioned here: https://www.nsnam.org/wiki/Ns-3_on_Visual_Studio_2012 the supported modules. I was wondering if the wave module  is supported or not (https://www.nsnam.org/docs/models/html/wave.html)?
OR how can I added it ? Please advise.
Thanks in advance!

John Abraham

unread,
Nov 23, 2015, 8:22:36 AM11/23/15
to ns-3-...@googlegroups.com

Doaa Terri

unread,
Nov 24, 2015, 2:22:29 AM11/24/15
to ns-3-users
Thank you john for your reply!
I have followed the instructions of how to create a new module, but when I tried to build the project, I got this error :
Error 1 error MSB3073: The command "copy "C:\Users\doaa\ns-3-win2\windows\ns-3-dev\\..\..\src\Wave\model\*.h"  "C:\Users\doaa.alterri\ns-3-win2\windows\ns-3-dev\\headers\ns3"
copy "C:\Users\doaa\ns-3-win2\windows\ns-3-dev\\..\..\src\Wave\helper\*.h"  "C:\Users\doaa.alterri\ns-3-win2\windows\ns-3-dev\\headers\ns3"
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 134

Do you have any idea why I got this error?
your feedback is much appreciated!


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/it8TLldbKVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Imran Durani

unread,
Nov 24, 2015, 5:21:08 AM11/24/15
to ns-3-users, ns-dev...@isi.edu
Hi John!

Thanks for integrating NS3 in visual studio. 

I'm very beginner to NS3, I have installed and run the main module successfully. Now i'm confused how to run other modules like network, csma etc. I followed to "Changing the main program, but failed to load other programs. Can you please provide a tutorial or help me out? 
And one thing more, Does NS3 on VisualStudio also support sensor network?

John Abraham

unread,
Nov 24, 2015, 9:01:55 PM11/24/15
to ns-3-...@googlegroups.com
Maybe a permission issue?
Are you able to open the DOS prompt and execute the copy command?
copy "C:\Users\doaa\ns-3-win2\windows\ns-3-dev\\..\..\src\Wave\model\*.h"  "C:\Users\doaa.alterri\ns-3-win2\windows\ns-3-dev\\headers\ns3

John Abraham

unread,
Nov 24, 2015, 9:04:22 PM11/24/15
to ns-3-...@googlegroups.com
well network / csma are libraries. They do not have any executable to run (no main function). 
ns-3-win2 is fairly outdated. It should just be considered as a proof of concept at this point

Doaa

unread,
Nov 25, 2015, 4:00:10 AM11/25/15
to ns-3-users
Hi John 

when I tried to execute the command, it is not executed, I got this "the system cannot find the path specified". 
Well, in the path , there is \src\Wave\model\*.h, but there is so file with the name of "Wave" is created in src. I think this is the problem. 
Please advise.

John Abraham

unread,
Nov 25, 2015, 8:39:52 AM11/25/15
to ns-3-...@googlegroups.com
Yes that is right. Based on your path you need Wave under src

Doaa Terri

unread,
Nov 25, 2015, 8:41:29 AM11/25/15
to ns-3-users

So I should add it by myself ?

John Abraham

unread,
Nov 25, 2015, 8:43:32 AM11/25/15
to ns-3-...@googlegroups.com
it depends: you do know that network, internet, core are all modules correct? Your "Wave" module should ideally look similar to the directory structure of the other modules.

Doaa Terri

unread,
Nov 25, 2015, 8:57:16 AM11/25/15
to ns-3-users
Actually the wave module is a ns-3 module (https://www.nsnam.org/doxygen/dir_b33674de6843d4cf63b42f6a7e6012fb.html) but it is not included in the version that I work on, 
So basically I am trying to add it to the NS-3 version that I have. I will take the directory files from this link (https://www.nsnam.org/doxygen/dir_b33674de6843d4cf63b42f6a7e6012fb.html). So, is this possible?

John Abraham

unread,
Nov 25, 2015, 9:27:03 AM11/25/15
to ns-3-...@googlegroups.com
in theory it should be possible. but I haven't tried it.Take some time to go through the directory structure of src in Windows explorer. wave module should  look identical to other modules.

I would cp "wave" to src/ and try it all over again.

The other approach is to drag and drop the *.h and *cc files of wave directly into the main project .

Doaa Terri

unread,
Nov 25, 2015, 10:28:10 AM11/25/15
to ns-3-users
I will try that, Thank you very much for your suggestions!

Doaa

unread,
Jan 18, 2016, 8:21:29 AM1/18/16
to ns-3-users
Hello John 
Just wanted to check if you cp  "wave" to src/?
because I am facing some problems in adding the wave module to the existing ones
Regards
Reply all
Reply to author
Forward
0 new messages