Difference between revisions of "HOWTO use ns-3 on Windows with Visual Studio 2010"

From Nsnam
Jump to: navigation, search
(First Build)
(First Build)
Line 19: Line 19:
 
# Open the "ns-3-dev.sln" Visual studio 2010 solution file by double-clicking it.
 
# Open the "ns-3-dev.sln" Visual studio 2010 solution file by double-clicking it.
 
# Once the entire solution is opened, right-click the "ns-3-dev-lib" project and select the "build" option.Here is a [http://www.youtube.com/watch?v=2QRbtax1j5Q youtube video] showing the previous two steps.
 
# Once the entire solution is opened, right-click the "ns-3-dev-lib" project and select the "build" option.Here is a [http://www.youtube.com/watch?v=2QRbtax1j5Q youtube video] showing the previous two steps.
#
+
# After ensuring "ns-3-dev-lib.lib" is successfully built , right-click on the "Main" project and select build.Here is a [http://www.youtube.com/watch?v=ozA_6DvuLwI youtube video] showing this step.
 +
# Watch out linker errors (some are expected during the release of ns-3.10-Win-1.0 as several components are missing.Locate the "ns3Main.exe" file and double-click it.Here is a [youtube video] showing this step.
  
 
= Adding your code =
 
= Adding your code =
 
= Debugging =
 
= Debugging =

Revision as of 15:31, 12 March 2011

Installation & Usage for NS3 on Windows

Requirements

  • Microsoft Visual Studio 2010
  • Microsoft Windows 7 or Microsoft Windows XP

Note: By default the /MP compiler option is set to 30 reduce build time. However, this setting can significantly impact the performance of your system if processor and memory resources are limited. Please remove this option or reduce the number from 30 , based on your system's capabilities. For more on the MP option visit this link

Here is a youtube video showing how to locate the MP option

Download

First Build

Currently the Visual Studio Solution is organized into two project. This organization is liable to change in the upcoming releases

  1. Main project: Containing the Windows GUI components, the examples folder and the folder where your scripts may go.The output of this project is the ns3Main.exe executable.
  2. ns-3-dev-lib project: Containing the "src" folder from the parent ns-3 project.The output of this project is the "ns-3-dev-lib.lib" static library which the "Main" project will link into


The steps to build the ns3Main.exe executable are as follows

  1. Open the "ns-3-dev.sln" Visual studio 2010 solution file by double-clicking it.
  2. Once the entire solution is opened, right-click the "ns-3-dev-lib" project and select the "build" option.Here is a youtube video showing the previous two steps.
  3. After ensuring "ns-3-dev-lib.lib" is successfully built , right-click on the "Main" project and select build.Here is a youtube video showing this step.
  4. Watch out linker errors (some are expected during the release of ns-3.10-Win-1.0 as several components are missing.Locate the "ns3Main.exe" file and double-click it.Here is a [youtube video] showing this step.

Adding your code

Debugging