Difference between revisions of "Windows Port of ns-3 using Visual Studio"

From Nsnam
Jump to: navigation, search
(Software download)
(update old windows page)
 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A project to extend NS3 functionality on Windows operating-systems
+
'''Note:  This page is dated and kept only for historical reference; it has been replaced by [[Ns-3_on_Visual_Studio_2012 | ns-3 on Visual Studio 2012]].'''
  
If you want to try the unstable pilot implementation , go to [[#Software download]]
+
A project to extend NS3 functionality on Windows operating-systems (Specifically Visual Studio integration)
 
+
Note: Currently the development support for this project is limited. So expect bugs and delayed response to queries.
+
Please use this [http://groups.google.com/group/ns3-on-windows google-group] for queries and feedback.
+
  
 
= Project Goals =
 
= Project Goals =
Line 11: Line 8:
 
# To integrate NS3 into IDE's such as Visual Studio 2010
 
# To integrate NS3 into IDE's such as Visual Studio 2010
 
# To integrate NS3 into IDE's such as Visual Studio 2008 (Stretch Goal)
 
# To integrate NS3 into IDE's such as Visual Studio 2008 (Stretch Goal)
 
It is envisioned to develop an application which can open a Windows Console or a Windows GUI based on user selection via the command-line.
 
At least one sample Windows GUI will be provided. Here is an example GUI:
 
 
[[File:ns3controlPanel.png]]
 
  
 
= Development Plan =
 
= Development Plan =
 
# Feasibility study and pilot implementation
 
# Feasibility study and pilot implementation
# After the final commit from the [http://www.nsnam.org/wiki/index.php/App_Store_Technical_Requirements NS3 Modularization project] finalize folder structure and module list
+
# After the final commit from the [[App Store Technical Requirements|ns-3 modularization project]] finalize folder structure and module list
 
# Review and commit changes for Windows onto ns-3.11
 
# Review and commit changes for Windows onto ns-3.11
 
# Review copyrights,coding-style and documentation
 
# Review copyrights,coding-style and documentation
Line 25: Line 17:
  
 
= Current status =
 
= Current status =
# The feasibility study is underway and a pilot (unstable) implementation is available at [[#Software download]]
+
# The feasibility study was done .An unstable implementation built on ns-3.10 is available at [[#Software download]] (OBSOLETE)
 +
# After the ns-3 modularization project a new unstable version is available, built on the ns-3-dev lineup
  
 
= Software download =
 
= Software download =
* Version (ns-3.10-Win-1.1) Pilot/Limited feature/Alpha version built on ns-3-dev(dated 02/07/2011)
+
* Version (ns-3-Win2.0) built on ns-3-dev(dated 05/23/2011)
Download from [http://code.nsnam.org/jabraham3/ns3-on-windows/ns-3.10-Win-1.0/raw-file//ns-3.10-Win-1.1.zip here]
+
Download via mercurial: "hg clone http://code.nsnam.org/jabraham3/ns-3-win"
  
 +
Changelog & Caveats:
 +
 +
# The ~30 modules of ns-3 can be built independently as projects within the master solution, saving time
 +
# Instead of building all the examples within the solution, I have provided a facility to run only one example at a time.This is due to the fact that I wanted to reduce the changes required and considering the fact any user deals with 1 or 2 examples at most at any given time. (A Visual Studio solution provides only executable at any point)
 +
# The project files will need to be downloaded via "mercurial"
 +
# Optional features such as click,mpi,openflow can be built, however I have made these project files dormant. It is left to the end-user to enable them and point to the required include libraries to run its examples. I might provide instructions later on how to handle the optional features as time permits
 +
# Any windows-based solution is always going to be a subset of the main ns-3 project and will have a reduced feature-set.
 +
# This version is built on ns-3-dev rather than ns-3.10.
 +
# The GUI MFC code is removed, as I prefer to maintain it separately.
 +
 +
The following are some of the missing features
 +
(some are excluded currently due to lack of time in porting them,some because they depend on third-party s/w
 +
and some can never be supported for windows)
 +
 +
# waf,Python-binding,Visualizer (portable). Note:Visual studio solution does not require waf at this point.
 +
# watchdog.cc,wall-clock-synchronizer.cc,unix-system-wall-clock-ms.cc,unix-system-thread.cc,unix-system-condition.cc,unix-fd-reader.cc,int64x64-cairo.cc,int64x64-128.cc (can be sort of ported)
 +
# config-store (portable)
 +
# All NSC code (non-portable)
 +
# SQL dependent code (portable)
 +
# rocketfuel-topology-reader.cc (portable)
 +
# Real-time simulator (????)
 +
# lte-multiple-flows.cc (portable)
 +
# main-test-sync.cc (portable)
 +
# nms-p2p-* files (portable)
 +
 +
 +
* Version (ns-3.10-Win-1.3) Alpha version built on ns-3-dev(dated 02/07/2011)
 +
Download from [http://code.nsnam.org/jabraham3/ns3-on-windows/ns-3.10-Win-1.3/raw-file/cadc7969c1f2/ns-3.10-Win-1.3.zip here]
 +
 +
Changelog & Caveats:
 +
# This version caters to "Distributed simulation/MPI".
 +
# A separate Visual Studio 2010 Solution file "ns-3-dev-MPI.sln" is provided in addition to the default "ns-3-dev.sln",
 +
# "ns-3-dev-MPI.sln" is required to build "ns-dev" static libraries with MPI/Distributed simulation related code available.
 +
# The MPI-related examples have an associated Makefile, to help build them.
 +
# Distributed simulation is run with the aid of "Open MPI". As Open MPI's "mpirun" utility requires a console application, distributed-simulation needs to be a console app (i.e Windows GUI components won't be available).
 +
# nms* examples are not included as they use "variable-length arrays" with are C99 features not supported on Visual C++.These examples might be made available in a future version.
 +
Please visit the [[#Installation & Usage]] page for more details
 +
 +
 +
 +
* Version (ns-3.10-Win-1.2) Alpha version built on ns-3-dev(dated 02/07/2011)
 +
Download from [http://code.nsnam.org/jabraham3/ns3-on-windows/ns-3.10-Win-1.2/raw-file/f475b791b345/ns-3.10-Win-1.2.zip here]
 +
 +
Download NetAnim for Windows from [http://code.nsnam.org/jabraham3/ns3-on-windows/ns-3.10-Win-1.2/raw-file/78d716fec82a/NetAnim.zip here]
 +
 +
Changelog & Caveats:
 +
# Examples under Animation are enabled
 +
# A Windows port of NetAnim
 +
# Possible memory-leak if "Stop" button is pressed before Simulation ends (Need a way to gracefully shutdown simulator in future versions).
 +
 +
 +
* Version (ns-3.10-Win-1.1)  Pilot/Limited feature/Alpha version built on ns-3-dev(dated 02/07/2011)
 +
Download from [http://code.nsnam.org/jabraham3/ns3-on-windows/ns-3.10-Win-1.1/raw-file/39ad64b4bfc9/ns-3.10-Win-1.1.zip here]
  
 
Changelog & Caveats:
 
Changelog & Caveats:
Line 61: Line 107:
 
# This version fixes a major buffer-security bug in the first version (this is not related to the ns3 code).
 
# This version fixes a major buffer-security bug in the first version (this is not related to the ns3 code).
 
# There should be zero linker errors & zero linker warnings in this version.
 
# There should be zero linker errors & zero linker warnings in this version.
 
 
 
* Version (ns-3.10-Win-1.0)  Pilot/Limited feature/Alpha version built on ns-3-dev(dated 02/07/2011)
 
Download from [http://code.nsnam.org/jabraham3/ns3-on-windows/ns-3.10-Win-1.0/raw-file/020dc57425eb/ns-3.10-Win-1.0.zip here]
 
 
 
Changelog & Caveats:
 
'''Please do not run any of the wireless examples in this release'''
 
Most components under "src" are integrated into Visual Studio 2010 with only trivial syntactical changes except for the following which have been explicitly excluded for this version
 
# Missing code from Core simulator:
 
#* tools
 
#* test
 
#* mpi
 
#* contrib
 
#* cairo high-precision
 
#* any animation related code
 
#* tap-bridge
 
#* nist-error-rate-model and yans-error-rate-model, which implies most wireless code is unusable
 
#* emulation
 
#* olsr
 
#* NSC
 
#* realtime
 
#* utils
 
#* python bindings
 
#* unix* and wall-clock-synchronization
 
#* matrix topology reader
 
#* buffer-test.cc
 
# Missing code from Examples:
 
#* examples/wireless
 
#* examples/mpi
 
#* examples/socket
 
#* examples/realtime
 
#* examples/topology-read
 
#* examples/stats
 
#* examples/matrix-topology
 
#* examples/error-model
 
#* examples/energy
 
#* examples/emulation
 
#* examples/animation
 
 
Expected Linker failure logs:
 
<nowiki>
 
1>------ Build started: Project: Main, Configuration: Debug Win32 ------
 
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
 
1>    Creating library C:\Users\john\Documents\Virtual Machines\Dropbox\ns-3-dev-windows-lite6\ns-3-dev\Windows\ns-3-dev\Debug\Ns3Main.lib and object C:\Users\john\Documents\Virtual Machines\Dropbox\ns-3-dev-windows-lite6\ns-3-dev\Windows\ns-3-dev\Debug\Ns3Main.exp
 
1>acoustic-modem-energy-model-helper.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ns3::DeviceEnergyModelHelper::~DeviceEnergyModelHelper(void)" (??1DeviceEnergyModelHelper@ns3@@UAE@XZ) referenced in function __unwindfunclet$??0AcousticModemEnergyModelHelper@ns3@@QAE@XZ$0
 
1>acoustic-modem-energy-model-helper.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::EnergySource::SetNode(class ns3::Ptr<class ns3::Node>)" (?SetNode@EnergySource@ns3@@QAEXV?$Ptr@VNode@ns3@@@2@@Z) referenced in function "private: virtual class ns3::Ptr<class ns3::DeviceEnergyModel> __thiscall ns3::AcousticModemEnergyModelHelper::DoInstall(class ns3::Ptr<class ns3::NetDevice>,class ns3::Ptr<class ns3::EnergySource>)const " (?DoInstall@AcousticModemEnergyModelHelper@ns3@@EBE?AV?$Ptr@VDeviceEnergyModel@ns3@@@2@V?$Ptr@VNetDevice@ns3@@@2@V?$Ptr@VEnergySource@ns3@@@2@@Z)
 
1>acoustic-modem-energy-model-helper.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::EnergySource::AppendDeviceEnergyModel(class ns3::Ptr<class ns3::DeviceEnergyModel>)" (?AppendDeviceEnergyModel@EnergySource@ns3@@QAEXV?$Ptr@VDeviceEnergyModel@ns3@@@2@@Z) referenced in function "private: virtual class ns3::Ptr<class ns3::DeviceEnergyModel> __thiscall ns3::AcousticModemEnergyModelHelper::DoInstall(class ns3::Ptr<class ns3::NetDevice>,class ns3::Ptr<class ns3::EnergySource>)const " (?DoInstall@AcousticModemEnergyModelHelper@ns3@@EBE?AV?$Ptr@VDeviceEnergyModel@ns3@@@2@V?$Ptr@VNetDevice@ns3@@@2@V?$Ptr@VEnergySource@ns3@@@2@@Z)
 
1>acoustic-modem-energy-model-helper.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::AcousticModemEnergyModel::SetEnergyDepletionCallback(class ns3::Callback<void,class ns3::empty,class ns3::empty,class ns3::empty,class ns3::empty,class ns3::empty,class ns3::empty,class ns3::empty,class ns3::empty,class ns3::empty>)" (?SetEnergyDepletionCallback@AcousticModemEnergyModel@ns3@@QAEXV?$Callback@XVempty@ns3@@V12@V12@V12@V12@V12@V12@V12@V12@@2@@Z) referenced in function "private: virtual class ns3::Ptr<class ns3::DeviceEnergyModel> __thiscall ns3::AcousticModemEnergyModelHelper::DoInstall(class ns3::Ptr<class ns3::NetDevice>,class ns3::Ptr<class ns3::EnergySource>)const " (?DoInstall@AcousticModemEnergyModelHelper@ns3@@EBE?AV?$Ptr@VDeviceEnergyModel@ns3@@@2@V?$Ptr@VNetDevice@ns3@@@2@V?$Ptr@VEnergySource@ns3@@@2@@Z)
 
1>acoustic-modem-energy-model-helper.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::AcousticModemEnergyModel::GetTypeId(void)" (?GetTypeId@AcousticModemEnergyModel@ns3@@SA?AVTypeId@2@XZ) referenced in function "public: class ns3::Ptr<class ns3::AcousticModemEnergyModel> __thiscall ns3::Object::GetObject<class ns3::AcousticModemEnergyModel>(void)const " (??$GetObject@VAcousticModemEnergyModel@ns3@@@Object@ns3@@QBE?AV?$Ptr@VAcousticModemEnergyModel@ns3@@@1@XZ)
 
1>uan-energy-model-test.obj : error LNK2001: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::AcousticModemEnergyModel::GetTypeId(void)" (?GetTypeId@AcousticModemEnergyModel@ns3@@SA?AVTypeId@2@XZ)
 
1>emu-helper.obj : error LNK2019: unresolved external symbol "public: class ns3::Ptr<class ns3::Queue> __thiscall ns3::EmuNetDevice::GetQueue(void)const " (?GetQueue@EmuNetDevice@ns3@@QBE?AV?$Ptr@VQueue@ns3@@@2@XZ) referenced in function "private: virtual void __thiscall ns3::EmuHelper::EnableAsciiInternal(class ns3::Ptr<class ns3::OutputStreamWrapper>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class ns3::Ptr<class ns3::NetDevice>,bool)" (?EnableAsciiInternal@EmuHelper@ns3@@EAEXV?$Ptr@VOutputStreamWrapper@ns3@@@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$Ptr@VNetDevice@ns3@@@2@_N@Z)
 
1>emu-helper.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::EmuNetDevice::SetQueue(class ns3::Ptr<class ns3::Queue>)" (?SetQueue@EmuNetDevice@ns3@@QAEXV?$Ptr@VQueue@ns3@@@2@@Z) referenced in function "private: class ns3::Ptr<class ns3::NetDevice> __thiscall ns3::EmuHelper::InstallPriv(class ns3::Ptr<class ns3::Node>)const " (?InstallPriv@EmuHelper@ns3@@ABE?AV?$Ptr@VNetDevice@ns3@@@2@V?$Ptr@VNode@ns3@@@2@@Z)
 
1>emu-helper.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::EmuNetDevice::GetTypeId(void)" (?GetTypeId@EmuNetDevice@ns3@@SA?AVTypeId@2@XZ) referenced in function "public: class ns3::Ptr<class ns3::EmuNetDevice> __thiscall ns3::Object::GetObject<class ns3::EmuNetDevice>(void)const " (??$GetObject@VEmuNetDevice@ns3@@@Object@ns3@@QBE?AV?$Ptr@VEmuNetDevice@ns3@@@1@XZ)
 
1>realtime-simulator-impl.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::SystemMutex::~SystemMutex(void)" (??1SystemMutex@ns3@@QAE@XZ) referenced in function __unwindfunclet$??0RealtimeSimulatorImpl@ns3@@QAE@XZ$0
 
1>realtime-simulator-impl.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::SystemMutex::SystemMutex(void)" (??0SystemMutex@ns3@@QAE@XZ) referenced in function "public: __thiscall ns3::RealtimeSimulatorImpl::RealtimeSimulatorImpl(void)" (??0RealtimeSimulatorImpl@ns3@@QAE@XZ)
 
1>realtime-simulator-impl.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::CriticalSection::~CriticalSection(void)" (??1CriticalSection@ns3@@QAE@XZ) referenced in function "public: virtual void __thiscall ns3::RealtimeSimulatorImpl::SetScheduler(class ns3::ObjectFactory)" (?SetScheduler@RealtimeSimulatorImpl@ns3@@UAEXVObjectFactory@2@@Z)
 
1>realtime-simulator-impl.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::CriticalSection::CriticalSection(class ns3::SystemMutex &)" (??0CriticalSection@ns3@@QAE@AAVSystemMutex@1@@Z) referenced in function "public: virtual void __thiscall ns3::RealtimeSimulatorImpl::SetScheduler(class ns3::ObjectFactory)" (?SetScheduler@RealtimeSimulatorImpl@ns3@@UAEXVObjectFactory@2@@Z)
 
1>realtime-simulator-impl.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::WallClockSynchronizer::WallClockSynchronizer(void)" (??0WallClockSynchronizer@ns3@@QAE@XZ) referenced in function "class ns3::Ptr<class ns3::WallClockSynchronizer> __cdecl ns3::CreateObject<class ns3::WallClockSynchronizer>(void)" (??$CreateObject@VWallClockSynchronizer@ns3@@@ns3@@YA?AV?$Ptr@VWallClockSynchronizer@ns3@@@0@XZ)
 
1>tap-bridge-helper.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::TapBridge::SetBridgedNetDevice(class ns3::Ptr<class ns3::NetDevice>)" (?SetBridgedNetDevice@TapBridge@ns3@@QAEXV?$Ptr@VNetDevice@ns3@@@2@@Z) referenced in function "public: class ns3::Ptr<class ns3::NetDevice> __thiscall ns3::TapBridgeHelper::Install(class ns3::Ptr<class ns3::Node>,class ns3::Ptr<classns3::NetDevice>)" (?Install@TapBridgeHelper@ns3@@QAE?AV?$Ptr@VNetDevice@ns3@@@2@V?$Ptr@VNode@ns3@@@2@V32@@Z)
 
1>tap-bridge-helper.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::TapBridge::GetTypeId(void)" (?GetTypeId@TapBridge@ns3@@SA?AVTypeId@2@XZ) referenced in function "public: class ns3::Ptr<class ns3::TapBridge> __thiscall ns3::Object::GetObject<class ns3::TapBridge>(void)const " (??$GetObject@VTapBridge@ns3@@@Object@ns3@@QBE?AV?$Ptr@VTapBridge@ns3@@@1@XZ)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::TopologyReader::SetFileName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?SetFileName@TopologyReader@ns3@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: class ns3::Ptr<class ns3::TopologyReader> __thiscall ns3::TopologyReaderHelper::GetTopologyReader(void)" (?GetTopologyReader@TopologyReaderHelper@ns3@@QAE?AV?$Ptr@VTopologyReader@ns3@@@2@XZ)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::OrbisTopologyReader::OrbisTopologyReader(void)" (??0OrbisTopologyReader@ns3@@QAE@XZ) referenced in function "class ns3::Ptr<class ns3::OrbisTopologyReader> __cdecl ns3::CreateObject<class ns3::OrbisTopologyReader>(void)" (??$CreateObject@VOrbisTopologyReader@ns3@@@ns3@@YA?AV?$Ptr@VOrbisTopologyReader@ns3@@@0@XZ)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::InetTopologyReader::InetTopologyReader(void)" (??0InetTopologyReader@ns3@@QAE@XZ) referenced in function "class ns3::Ptr<class ns3::InetTopologyReader> __cdecl ns3::CreateObject<class ns3::InetTopologyReader>(void)" (??$CreateObject@VInetTopologyReader@ns3@@@ns3@@YA?AV?$Ptr@VInetTopologyReader@ns3@@@0@XZ)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::RocketfuelTopologyReader::RocketfuelTopologyReader(void)" (??0RocketfuelTopologyReader@ns3@@QAE@XZ) referenced in function "class ns3::Ptr<class ns3::RocketfuelTopologyReader> __cdecl ns3::CreateObject<class ns3::RocketfuelTopologyReader>(void)" (??$CreateObject@VRocketfuelTopologyReader@ns3@@@ns3@@YA?AV?$Ptr@VRocketfuelTopologyReader@ns3@@@0@XZ)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::OrbisTopologyReader::GetTypeId(void)" (?GetTypeId@OrbisTopologyReader@ns3@@SA?AVTypeId@2@XZ) referenced in function "class ns3::Ptr<class ns3::OrbisTopologyReader> __cdecl ns3::CompleteConstruct<class ns3::OrbisTopologyReader>(class ns3::OrbisTopologyReader *)" (??$CompleteConstruct@VOrbisTopologyReader@ns3@@@ns3@@YA?AV?$Ptr@VOrbisTopologyReader@ns3@@@0@PAVOrbisTopologyReader@0@@Z)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::InetTopologyReader::GetTypeId(void)" (?GetTypeId@InetTopologyReader@ns3@@SA?AVTypeId@2@XZ) referenced in function "class ns3::Ptr<class ns3::InetTopologyReader> __cdecl ns3::CompleteConstruct<class ns3::InetTopologyReader>(class ns3::InetTopologyReader *)" (??$CompleteConstruct@VInetTopologyReader@ns3@@@ns3@@YA?AV?$Ptr@VInetTopologyReader@ns3@@@0@PAVInetTopologyReader@0@@Z)
 
1>topology-reader-helper.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::RocketfuelTopologyReader::GetTypeId(void)" (?GetTypeId@RocketfuelTopologyReader@ns3@@SA?AVTypeId@2@XZ) referenced in function "class ns3::Ptr<class ns3::RocketfuelTopologyReader> __cdecl ns3::CompleteConstruct<class ns3::RocketfuelTopologyReader>(class ns3::RocketfuelTopologyReader *)" (??$CompleteConstruct@VRocketfuelTopologyReader@ns3@@@ns3@@YA?AV?$Ptr@VRocketfuelTopologyReader@ns3@@@0@PAVRocketfuelTopologyReader@0@@Z)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: double __thiscall ns3::AcousticModemEnergyModel::GetTxPowerW(void)const " (?GetTxPowerW@AcousticModemEnergyModel@ns3@@QBENXZ) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ns3::BasicEnergySourceHelper::~BasicEnergySourceHelper(void)" (??1BasicEnergySourceHelper@ns3@@UAE@XZ) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: double __thiscall ns3::AcousticModemEnergyModel::GetIdlePowerW(void)const " (?GetIdlePowerW@AcousticModemEnergyModel@ns3@@QBENXZ) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: double __thiscall ns3::AcousticModemEnergyModel::GetRxPowerW(void)const " (?GetRxPowerW@AcousticModemEnergyModel@ns3@@QBENXZ) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: class ns3::Ptr<class ns3::DeviceEnergyModel> __thiscall ns3::DeviceEnergyModelContainer::Get(unsigned int)const " (?Get@DeviceEnergyModelContainer@ns3@@QBE?AV?$Ptr@VDeviceEnergyModel@ns3@@@2@I@Z) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: class ns3::DeviceEnergyModelContainer __thiscall ns3::DeviceEnergyModelHelper::Install(class ns3::Ptr<class ns3::NetDevice>,class ns3::Ptr<class ns3::EnergySource>)const " (?Install@DeviceEnergyModelHelper@ns3@@QBE?AVDeviceEnergyModelContainer@2@V?$Ptr@VNetDevice@ns3@@@2@V?$Ptr@VEnergySource@ns3@@@2@@Z) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: class ns3::Ptr<class ns3::EnergySource> __thiscall ns3::EnergySourceContainer::Get(unsigned int)const " (?Get@EnergySourceContainer@ns3@@QBE?AV?$Ptr@VEnergySource@ns3@@@2@I@Z) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ns3::EnergySourceContainer::~EnergySourceContainer(void)" (??1EnergySourceContainer@ns3@@UAE@XZ) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: class ns3::EnergySourceContainer __thiscall ns3::EnergySourceHelper::Install(class ns3::Ptr<class ns3::Node>)const " (?Install@EnergySourceHelper@ns3@@QBE?AVEnergySourceContainer@2@V?$Ptr@VNode@ns3@@@2@@Z) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall ns3::BasicEnergySourceHelper::Set(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class ns3::AttributeValue const &)" (?Set@BasicEnergySourceHelper@ns3@@UAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVAttributeValue@2@@Z) referenced infunction "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::BasicEnergySourceHelper::BasicEnergySourceHelper(void)" (??0BasicEnergySourceHelper@ns3@@QAE@XZ) referenced in function "public: virtual void __thiscall ns3::AcousticModemEnergyTestCase::DoRun(void)" (?DoRun@AcousticModemEnergyTestCase@ns3@@UAEXXZ)
 
1>uan-energy-model-test.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::EnergySourceContainer::GetTypeId(void)" (?GetTypeId@EnergySourceContainer@ns3@@SA?AVTypeId@2@XZ) referenced in function "public: class ns3::Ptr<class ns3::EnergySourceContainer> __thiscall ns3::Object::GetObject<class ns3::EnergySourceContainer>(void)const " (??$GetObject@VEnergySourceContainer@ns3@@@Object@ns3@@QBE?AV?$Ptr@VEnergySourceContainer@ns3@@@1@XZ)
 
1>wifi-phy-test.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::FlowIdTag::FlowIdTag(unsigned int)" (??0FlowIdTag@ns3@@QAE@I@Z) referenced in function "private: void __thiscall CollisionExperiment::SendA(void)const " (?SendA@CollisionExperiment@@ABEXXZ)
 
1>wifi-phy-test.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall ns3::FlowIdTag::GetFlowId(void)const " (?GetFlowId@FlowIdTag@ns3@@QBEIXZ) referenced in function "private: void __thiscall CollisionExperiment::Receive(class ns3::Ptr<class ns3::Packet>,double,class ns3::WifiMode,enum ns3::WifiPreamble)" (?Receive@CollisionExperiment@@AAEXV?$Ptr@VPacket@ns3@@@ns3@@NVWifiMode@3@W4WifiPreamble@3@@Z)
 
1>wifi-phy-test.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::FlowIdTag::FlowIdTag(void)" (??0FlowIdTag@ns3@@QAE@XZ) referenced in function "private: void __thiscall CollisionExperiment::Receive(class ns3::Ptr<class ns3::Packet>,double,class ns3::WifiMode,enum ns3::WifiPreamble)" (?Receive@CollisionExperiment@@AAEXV?$Ptr@VPacket@ns3@@@ns3@@NVWifiMode@3@W4WifiPreamble@3@@Z)
 
1>wifi-phy-test.obj : error LNK2019: unresolved external symbol "public: static unsigned int __cdecl ns3::FlowIdTag::AllocateFlowId(void)" (?AllocateFlowId@FlowIdTag@ns3@@SAIXZ) referenced in function "public: struct CollisionExperiment::Output __thiscall CollisionExperiment::Run(struct CollisionExperiment::Input)" (?Run@CollisionExperiment@@QAE?AUOutput@1@UInput@1@@Z)
 
1>wifi-phy-test.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::YansErrorRateModel::YansErrorRateModel(void)" (??0YansErrorRateModel@ns3@@QAE@XZ) referenced in function "class ns3::Ptr<class ns3::YansErrorRateModel> __cdecl ns3::CreateObject<class ns3::YansErrorRateModel>(void)" (??$CreateObject@VYansErrorRateModel@ns3@@@ns3@@YA?AV?$Ptr@VYansErrorRateModel@ns3@@@0@XZ)
 
1>wifi-test.obj : error LNK2001: unresolved external symbol "public: __thiscall ns3::YansErrorRateModel::YansErrorRateModel(void)" (??0YansErrorRateModel@ns3@@QAE@XZ)
 
1>wifi-phy-test.obj : error LNK2019: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::YansErrorRateModel::GetTypeId(void)" (?GetTypeId@YansErrorRateModel@ns3@@SA?AVTypeId@2@XZ) referenced in function "class ns3::Ptr<class ns3::YansErrorRateModel> __cdecl ns3::CompleteConstruct<class ns3::YansErrorRateModel>(class ns3::YansErrorRateModel *)" (??$CompleteConstruct@VYansErrorRateModel@ns3@@@ns3@@YA?AV?$Ptr@VYansErrorRateModel@ns3@@@0@PAVYansErrorRateModel@0@@Z)
 
1>wifi-test.obj : error LNK2001: unresolved external symbol "public: static class ns3::TypeId __cdecl ns3::YansErrorRateModel::GetTypeId(void)" (?GetTypeId@YansErrorRateModel@ns3@@SA?AVTypeId@2@XZ)
 
1>simple-global-routing_win.obj : error LNK2019: unresolved external symbol "public: void __thiscall ns3::FlowMonitor::SerializeToXmlFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,bool)" (?SerializeToXmlFile@FlowMonitor@ns3@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N1@Z) referenced in function "int __cdecl simple_global_routing_win_main(int,char * *)" (?simple_global_routing_win_main@@YAHHPAPAD@Z)
 
1>simple-global-routing_win.obj : error LNK2019: unresolved external symbol "public: class ns3::Ptr<class ns3::FlowMonitor> __thiscall ns3::FlowMonitorHelper::InstallAll(void)" (?InstallAll@FlowMonitorHelper@ns3@@QAE?AV?$Ptr@VFlowMonitor@ns3@@@2@XZ) referenced in function "int __cdecl simple_global_routing_win_main(int,char * *)" (?simple_global_routing_win_main@@YAHHPAPAD@Z)
 
1>simple-global-routing_win.obj : error LNK2019: unresolved external symbol "public: __thiscall ns3::FlowMonitorHelper::FlowMonitorHelper(void)" (??0FlowMonitorHelper@ns3@@QAE@XZ) referenced in function "int __cdecl simple_global_routing_win_main(int,char * *)" (?simple_global_routing_win_main@@YAHHPAPAD@Z)
 
1>C:\Users\john\Documents\Virtual Machines\Dropbox\ns-3-dev-windows-lite6\ns-3-dev\Windows\ns-3-dev\Debug\Ns3Main.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
</nowiki>
 
  
 
= Installation & Usage =
 
= Installation & Usage =
Follow instructions at [[Installation & Usage]]
+
Follow instructions at [[Windows Port of ns-3 using Visual Studio Installation and Usage]]

Latest revision as of 14:08, 28 July 2015

Note: This page is dated and kept only for historical reference; it has been replaced by ns-3 on Visual Studio 2012.

A project to extend NS3 functionality on Windows operating-systems (Specifically Visual Studio integration)

Project Goals

  1. To reduce or eliminate the need for CygWin to run NS3 on Windows operating-systems
  2. To expose native Windows API to NS3 developers
  3. To integrate NS3 into IDE's such as Visual Studio 2010
  4. To integrate NS3 into IDE's such as Visual Studio 2008 (Stretch Goal)

Development Plan

  1. Feasibility study and pilot implementation
  2. After the final commit from the ns-3 modularization project finalize folder structure and module list
  3. Review and commit changes for Windows onto ns-3.11
  4. Review copyrights,coding-style and documentation
  5. Build automated build framework

Current status

  1. The feasibility study was done .An unstable implementation built on ns-3.10 is available at #Software download (OBSOLETE)
  2. After the ns-3 modularization project a new unstable version is available, built on the ns-3-dev lineup

Software download

  • Version (ns-3-Win2.0) built on ns-3-dev(dated 05/23/2011)

Download via mercurial: "hg clone http://code.nsnam.org/jabraham3/ns-3-win"

Changelog & Caveats:

  1. The ~30 modules of ns-3 can be built independently as projects within the master solution, saving time
  2. Instead of building all the examples within the solution, I have provided a facility to run only one example at a time.This is due to the fact that I wanted to reduce the changes required and considering the fact any user deals with 1 or 2 examples at most at any given time. (A Visual Studio solution provides only executable at any point)
  3. The project files will need to be downloaded via "mercurial"
  4. Optional features such as click,mpi,openflow can be built, however I have made these project files dormant. It is left to the end-user to enable them and point to the required include libraries to run its examples. I might provide instructions later on how to handle the optional features as time permits
  5. Any windows-based solution is always going to be a subset of the main ns-3 project and will have a reduced feature-set.
  6. This version is built on ns-3-dev rather than ns-3.10.
  7. The GUI MFC code is removed, as I prefer to maintain it separately.

The following are some of the missing features (some are excluded currently due to lack of time in porting them,some because they depend on third-party s/w and some can never be supported for windows)

  1. waf,Python-binding,Visualizer (portable). Note:Visual studio solution does not require waf at this point.
  2. watchdog.cc,wall-clock-synchronizer.cc,unix-system-wall-clock-ms.cc,unix-system-thread.cc,unix-system-condition.cc,unix-fd-reader.cc,int64x64-cairo.cc,int64x64-128.cc (can be sort of ported)
  3. config-store (portable)
  4. All NSC code (non-portable)
  5. SQL dependent code (portable)
  6. rocketfuel-topology-reader.cc (portable)
  7. Real-time simulator (????)
  8. lte-multiple-flows.cc (portable)
  9. main-test-sync.cc (portable)
  10. nms-p2p-* files (portable)


  • Version (ns-3.10-Win-1.3) Alpha version built on ns-3-dev(dated 02/07/2011)

Download from here

Changelog & Caveats:

  1. This version caters to "Distributed simulation/MPI".
  2. A separate Visual Studio 2010 Solution file "ns-3-dev-MPI.sln" is provided in addition to the default "ns-3-dev.sln",
  3. "ns-3-dev-MPI.sln" is required to build "ns-dev" static libraries with MPI/Distributed simulation related code available.
  4. The MPI-related examples have an associated Makefile, to help build them.
  5. Distributed simulation is run with the aid of "Open MPI". As Open MPI's "mpirun" utility requires a console application, distributed-simulation needs to be a console app (i.e Windows GUI components won't be available).
  6. nms* examples are not included as they use "variable-length arrays" with are C99 features not supported on Visual C++.These examples might be made available in a future version.

Please visit the #Installation & Usage page for more details


  • Version (ns-3.10-Win-1.2) Alpha version built on ns-3-dev(dated 02/07/2011)

Download from here

Download NetAnim for Windows from here

Changelog & Caveats:

  1. Examples under Animation are enabled
  2. A Windows port of NetAnim
  3. Possible memory-leak if "Stop" button is pressed before Simulation ends (Need a way to gracefully shutdown simulator in future versions).


  • Version (ns-3.10-Win-1.1) Pilot/Limited feature/Alpha version built on ns-3-dev(dated 02/07/2011)

Download from here

Changelog & Caveats:

  1. More examples have been enabled,including wireless and wimax.However, the following examples are still excluded:
    • examples/matrix-topology
    • examples/mpi
    • examples/realtime
    • examples/tap
    • examples/topology-read
    • examples/emulation
  2. Missing code from Core simulator:
    • tools
    • test
    • mpi
    • cairo high-precision
    • any animation related code
    • tap-bridge
    • emulation
    • NSC
    • realtime
    • utils
    • python bindings
    • unix* and wall-clock-synchronization
    • matrix topology reader
    • buffer-test.cc
  3. This version contains a port of gsl_erfc from GSL 1.14, as Visual Studio does not provide erfc in the standard math libraries. The erfc(x) port has been tested for x ranging from 0 to 3.5
  4. Most of the contrib code is now included, except for code such as xml-config,config-store,sqlite*,gtk dependent code etc.
  5. High-precision cairo is not yet ported.
  6. OLSR model and helper are included, but olsr\test and olsr\examples are excluded as high-precision cairo is still not ported.
  7. This version fixes a major buffer-security bug in the first version (this is not related to the ns3 code).
  8. There should be zero linker errors & zero linker warnings in this version.

Installation & Usage

Follow instructions at Windows Port of ns-3 using Visual Studio Installation and Usage