Installation of ns-2.35 in Windows 10 | Windows 11 Os

125 Aufrufe
Published
#Windows11 #Windows10 #ns2

Installation of ns-2.35 in Windows 10 or Windows 11 OS

Prerequisites
- Windows Subsystem for Linux (WSL)
follow the link to install WSL
https://www.nsnam.com/2021/05/how-to-install-ubuntu-within-windows-10.html

- ns-allinone-2.35.tar.gz from the following link
https://sourceforge.net/projects/nsnam/files/latest/download

- gcc-4.8 and g++-4.8 for ns-2.35, Ubuntu 18.04

Step 1 : Open command prompt or Power Shell
C:/ wsl

Move the ns-allinone-2.35.tar.gz file to linux /home/pradeepkumar

$ cp ns-allinone-2.35.tar.gz /home/pradeepkumar/
$ cd
$ pwd
$ ls
And check the file is available

unzip or untar the file
$ tar zxvf ns-allinone-2.35.tar.gz

gcc-4.8 and g++-4.8

$ sudo nano /etc/apt/sources.list
add the following line in the above file.

deb http://in.archive.ubuntu.com/ubuntu bionic main universe

$ sudo apt update
$ sudo apt install gcc-4.8 g++-4.8

Modify the following make files.

~ns-2.35/Makefile.in

Change @CC@ to gcc-4.8
change @CXX@ to g++-4.8

~nam-1.15/Makefile.in
~xgraph-12.2/Makefile.in
~otcl-1.14/Makefile.in

Change in all places
@CC@ to gcc-4.8
@CPP@ or @CXX@ to g++-4.8

open the file:
~ns-2.35/linkstate/ls.h

Change at the Line no 137
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }

to This
void eraseAll() { this-erase(baseMap::begin(), baseMap::end()); }

all the changes have been made..

$ ./install
It will show the PATH informaton once the installation is completed.
update the path information to the file called /home/pradeepkumar/.bashrc

$] nano /home/pradeepkumar/.bashrc
$ source .bashrc

$ ns
% indicates ns2 installed successfully...

Download the entire ns2 library from the following lin
https://github.com/tspradeepkumar/ns2


Join this channel to get access to perks:
https://www.youtube.com/channel/UCSckTbBIf39jf2dIbruS32A/join

My other Channel - https://www.youtube.com/tspradeepkumar1​
My Tech Blog - https://www.nsnam.com/
My Personal webiste - https://www.pradeepkumar.org ​
______________________________

Follow me on,
Instagram - https://www.instagram.com/tspradeepkumar
Facebook - https://www.facebook.com/tspradeep​
Twitter - https://twitter.com/tspradeepkumar​
________________________________
Kategorien
PC (Windows/Mac/Linux) Anleitungen
Kommentare deaktiviert.