Professional Documents
Culture Documents
Step 2:
install gcc-4.8 and g++-4.8
open the file using sudo mode
$ sudo nano /etc/apt/sources.list
Include the following line
deb http://in.archive.ubuntu.com/ubuntu bionic main universe
Step 3:
$ sudo apt update
Step 4:
$ sudo apt install gcc-4.8 g++-4.8
Step 5:
Extract the ns2 package to HOME folder
$ cd ns-allinone-2.35/ns-2.35
Step 6:
Modify the following in Makefile.in:
Change @CC@ to gcc-4.8
change @CXX@ to g++-4.8
ns-allinone-2.35/ns-2.35/Makefile.in
ns-allinone-2.35/nam-1.15/Makefile.in
ns-allinone-2.35/xgraph-12.2/Makefile.in
ns-allinone-2.35/otcl-1.14/Makefile.in
Step 7:
Open the file:
ns-allinone-2.35/ns-2.35/linkstate/ls.h
Change at Line no 137 as shown in the below line
void eraseAll(){this->erase(baseMap::begin(),baseMap::end());}
Step 8:
Open a new terminal
$ cd ns-allinone-2.35/
$ ./install
Step 9:
Now, Set the PATH:
Open a new Terminal,
$ gedit .bashrc
(Here, do the PATH settings) as shown below:
export PATH=$PATH:/home/mca-26/ns-allinone-2.35/bin:/home/mca-26/ns-allinone-2.35/tcl8.5.10/
unix:/home/mca-26/ns-allinone-2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=/home/mca-26/ns-allinone-2.35/otcl-1.14:/home/mca-26/ns-allinone-
2.35/lib
Step 10:
Logout and Login back
or
$ source .bashrc