- Download and install VMWare, ubuntu. ISO
- Do the following:
Sudo apt-Get install build-essential
Sudo apt-Get install tcl8.4
Sudo apt-Get install tcl8.4-Dev
Sudo apt-Get install tk8.4
Sudo apt-Get install tk8.4-Dev
Sudo apt-Get install libxmu-Dev
Using "gcc-V" to check GCC version (e.g. 4.4.5), then install g ++ with the same version
Sudo apt-Get install g ++ 4.4.5. if not available, direclty type "G ++", without version
- Tar-vxzf ns-allinone-2.33.tar.gz
- Install the pacth, in case the error (when using NAM) like the following:
NAM:
[Code omitted because of length]
: No event type or button # Or keysym
While executing
"Bind ListBox <mousewheel> {
% W yview scroll [expr {-(% d/120) * 4}] Units
}"
Invoked from
"If {[String equal [TK windowingsystem]" classic "]
| [String equal [TK windowingsystem] "Aqua"]} {
Bind ListBox <mousewheel> {
% W yview scroll [expr {..."
Solution:
1). http://bugs.gentoo.org/show_bug.cgi? Id = 225999, download Patch
2). Under "ns-allinone-2.33", patch-P0 <tk-8.4.18-tkBind.patch
3). Under "ns-allinone-2.33> tk8.4.18", patch-P0 <tk-8.4.lastevent.patch
1). $ CD/home/ns-allinone-2.33/otcl-1.13
$ Sudo gedit Configure. In
Modify at "Linux *)":
Shlib_ld = "LD-shared ",
As
Shlib_ld = "gcc-shared"
2). $ sudo gedit configure
Modify at "Linux *)"
Shlib_ld = "LD-shared ",
As
Shlib_ld = "gcc-shared"
3). Change ns-allinone-2.34/otcl-1.13/makefile. In
Cc = @ CC @
Cc = gcc-4.4 (UR current version)
4). Enter ns-allinone-2.33
./Install
- Setup Path Environment
Gedit ~ /. Bashrc
At the end of the file, type the following
(Note:/home/ns is ur own path for ns-allinone-2.33)
# LD_LIBRARY_PATH
Ootcl_lib =/home/ns/ns-allinone-2.33/otcl-1.13
Ns2_lib =/home/ns/ns-allinone-2.33/lib
X11_lib =/usr/x11r6/lib
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ otcl_lib: $ ns2_lib: $ x11_lib
# Tcl_library
Tcl_lib =/home/ns/ns-allinone-2.33/tcl8.4.18/Library
Usr_lib =/usr/lib
Export tcl_library = $ tcl_lib: $ usr_lib
# Path
Xgraph =/home/ns/ns-allinone-2.33/bin:/home/ns/ns-allinone-2.33/tcl8.4.18/Unix:/home/ns/ns-allinone-2.33/tk8.4.18/Unix
NS =/home/ns/ns-allinone-2.33/ns-2.33/
NAM =/home/ns/ns-allinone-2.33/nam-1.13/
Path = $ path: $ xgraph: $ ns: $ Nam
Save
Active path setting
Type: Source ~ /. Bashrc
Test (download from ns by example ).