ns2的安装
2010-04-12 09:42
155 查看
要想不麻烦 就要按最新版的gcc和ns2
这样一般一点问题也没有。。
要不就悲剧了。。
首先得安装必备软件包
# yum install autoconf automake gcc-c++ libX11-devel xorg-x11-proto-devel /
libXt-devel libXmu-devel
贴几个出现的问题~
问题一(2.33)
>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 within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."
解决方法:
在tk-8.4.14/generic/tbBind.c的第588行添加:
#ifdef GenericEvent
/* GenericEvent */ 0,
#endif
问题二
ubuntu10.04上装ns-allinone-2.33的问题
/home/gang/ns-allinone-2.33/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't definedld: final link failed: Nonrepresentable section on outputmake: *** [libotcl.so] 错误 1otcl-1.13 make failed! Exiting ...
ld的问题,在gcc 4.0版本以前是用ld -share来生成共享库,但是到了4.0以及以上版本,这个命令改为了gcc -share
进入otcl-1.13目录,找到configure.in.
将77行,
SHLIB_LD="ld -shared"
改为
SHLIB_LD="gcc -shared"
同时修改configure 第5518行
SHLIB_LD="ld -shared"
改为
SHLIB_LD="gcc -shared"
重新./install
最后
要编辑~/.bashrc
export PATH=$PATH:~/ns-allinone-2.33/bin:~/ns-allinone-2.33/tcl8.4.18/unix:/home/bpc/ns-allinone-2.33/tk8.4.18/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/bpc/ns-allinone-2.33/otcl-1.13:/home/bpc/ns-allinone-2.33/lib
export TCL_LIBRARY=$TCL_LIBRARY:/home/bpc/ns-allinone-2.33/tcl8.4.18/library
这样一般一点问题也没有。。
要不就悲剧了。。
首先得安装必备软件包
# yum install autoconf automake gcc-c++ libX11-devel xorg-x11-proto-devel /
libXt-devel libXmu-devel
贴几个出现的问题~
问题一(2.33)
>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 within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."
解决方法:
在tk-8.4.14/generic/tbBind.c的第588行添加:
#ifdef GenericEvent
/* GenericEvent */ 0,
#endif
问题二
ubuntu10.04上装ns-allinone-2.33的问题
/home/gang/ns-allinone-2.33/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't definedld: final link failed: Nonrepresentable section on outputmake: *** [libotcl.so] 错误 1otcl-1.13 make failed! Exiting ...
ld的问题,在gcc 4.0版本以前是用ld -share来生成共享库,但是到了4.0以及以上版本,这个命令改为了gcc -share
进入otcl-1.13目录,找到configure.in.
将77行,
SHLIB_LD="ld -shared"
改为
SHLIB_LD="gcc -shared"
同时修改configure 第5518行
SHLIB_LD="ld -shared"
改为
SHLIB_LD="gcc -shared"
重新./install
最后
要编辑~/.bashrc
export PATH=$PATH:~/ns-allinone-2.33/bin:~/ns-allinone-2.33/tcl8.4.18/unix:/home/bpc/ns-allinone-2.33/tk8.4.18/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/bpc/ns-allinone-2.33/otcl-1.13:/home/bpc/ns-allinone-2.33/lib
export TCL_LIBRARY=$TCL_LIBRARY:/home/bpc/ns-allinone-2.33/tcl8.4.18/library
相关文章推荐
- NS2安装方法
- [转]Ubuntu 10.04安装ns2-2.34
- ns2 安装&教程
- ubuntu下安装ns2详细步骤
- 关于NS2安装时的问题总结汇总
- 一步一步教你在CentOS6.0下安装NS2(ns-allinone-2.34.tar.gz)模拟仿真工具
- NS2:tcl-debug-2.0安装步骤
- windows(xp)+cygwin+ns2(2.30)安装
- 在cygwin下安装ns2
- ns2安装手记(示例使用ubuntu 11.1,ns2-2.35)
- linux(版本是红帽企业版5)下安装ns2(版本是ns-allinone-2.35)
- fedora 下ns2安装完后提示没有xgraph的解决办法
- ns2安装802.11p补丁包
- Ubuntu12.04中NS2的安装
- Windows XP下成功安装cygwin + NS2 2.27
- olsr学习之一:Ubuntu10.04下ns2-allinone-2.34安装方法
- ns2 安装
- CentOS 7 下安装 NS2
- Ubuntu 11.04 安装 ns2-allinone-2.34【完整版】(附各种问题解决方案)
- [ZZ]Ubuntu Linux 9.10 安装NS2笔记