NS tools installation on ubuntu14.04
Download the ns-allinone-2.35 from hereUnzip the package to your home directory.
ex. /home/parimal/
First and foremost we need to update the library
Initial command: sudo apt-get install build-essential
build-essential is a metapackage (a package that installs many other packages, like g++ and gcc: the GNU C & C++ compilers). It's required if you want to compile anything from source, and if you want to work with almost any programming language.
STEP 1: ~$ sudo apt-get install gcc-4.4 g++-4.4
STEP 2: ~$ sudo apt-get install libxt-dev libx11-dev libxmu-dev xorg-dev xgraph
STEP 3: ~$ cd /home/parimal/ns-allinone-2.35
STEP 4: ~$ gedit /home/parimal/ns-allinone-2.35/otcl-1.14/configure
Linux*)
SHLIB_CFLAGS="-fPIC"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
if test "$have_dl" = yes; then
# SHLIB_LD="${CC} -shared" // comment this line (line number 6576 )
SHLIB_LD=”gcc -shared” // add this line
DL_LIBS="-ldl"
DL_LD_FLAGS="-rdynamic"
STEP 5: ~$ gedit /home/parimal/ns-allinone-2.35/tcl8.4.18/unix/Makefile.in
#CC = @CC@ // comment this line (line number 232)
CC = @CC@-4.4 // add this line
STEP 6: ~$ gedit /home/parimal/ns-allinone-2.35/ns-2.35/Makefile.in
#CC = @CC@ // comment these two lines (line number 36 & 37 )
#CPP = @CXX@
CC = @CC@-4.4 // add these lines
CPP = @CXX@-4.4
STEP 7: ~$ gedit /home/parimal/ns-allinone-2.35/ns-2.35/Makefile
#CC = gcc // comment these two lines (line number 36 & 37 )
#CPP = g++
CC = gcc-4.4 // add these lines
CPP = g++-4.4
STEP 8: cd ~/ns-allinone-2.35
./install
STEP 9: cd ns-2.35
sudo make install
cd ../nam1.15
sudo make install
STEP 10: cd ~/ns-allinone-2.35
./validate
No comments:
Post a Comment