标签:tle org lib com baidu 编写 inf error simple
Ubuntu 18.04 (VMware)
sudo apt-get install g++-4.8
(注安装最新版g++会出现一些代码错误。Bing到参考[1],使用4.8版本不会有任何报错)
解压存放在/opt/目录下
tar xvf ns-allinone-2.35_gcc5.tar.gz
cd ns-allinone-2.35/
export CC=gcc-4.8 CXX=g++-4.8 && ./install
BaiduNetdisk:链接:https://pan.baidu.com/s/18wqs4pV37jauRcP2ou7v-w 提取码:mklm
参考[2]复制粘贴
#LD_LIBRARY_PATH
OTCL_LIB=/opt/ns-allinone-2.35/otcl-1.14/
NS2_LIB=/opt/ns-allinone-2.35/lib/
USR_Local_LIB=/usr/local/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_Local_LIB
#TCL_LIBRARY
TCL_LIB=/opt/ns-allinone-2.35/tcl8.5.10/library/
USR_LIB=/usr/lib/
export TCL_LIBRARY=$TCL_LIBRARY:$TCL_LIB:$USR_LIB
#PATH
XGRAPH=/opt/ns-allinone-2.35/xgraph-12.2/:/opt/ns-allinone-2.35/bin:/opt/ns-allinone-2.35/tcl8.5.10/unix:/opt/ns-allinone-2.35/tk8.5.10/unix
NS=/opt/ns-allinone-2.35/ns-2.35/
NAM=/opt/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$NS:$NAM:$XGRAPH
ns /opt/ns-allinone-2.35/ns-2.35/tcl/ex/simple.tcl
标签:tle org lib com baidu 编写 inf error simple
原文地址:https://www.cnblogs.com/goodswarm/p/10850695.html