请教cygwin下安装ns2

li_tianx 2010-03-17 11:20:01
本人使用的操作系统是win7,安装了据说支持win7的cygwin1.7,想在这个cygwin1.7上安装ns-allinone-2.34,但是在安装的过程中出现了下面的问题,请问该如何解决。
问题一:在ns-allinone-2.34目录下,执行./install,出现了下面的错误,
GINFO=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_SHLIB_EXT=\".dll\" /home
/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:1: warning: -fPIC ign
ored for target (all code is position independent)
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c: In function ‘TclpGe
tClicks’:
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:100: error: storage s
ize of ‘tz’ isn’t known
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:100: warning: unused
variable ‘tz’
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c: In function ‘Tcl_Ge
tTime’:
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:253: error: storage s
ize of ‘tz’ isn’t known
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:253: warning: unused
variable ‘tz’
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c: In function ‘SetTZI
fNecessary’:
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:457: error: ‘lastTZ
’ undeclared (first use in this function)
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:457: error: (Each und
eclared identifier is reported only once
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:457: error: for each
function it appears in.)
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c: In function ‘Cleanu
pMemory’:
/home/lenovo/ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c:491: error: ‘lastTZ
’ undeclared (first use in this function)
make: *** [tclUnixTime.o] Error 1
tcl8.4.18 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com


问题二:在ns-allinone-2.34/ns-2.34目录下,输入./configure,出现下面错误:
checking for otcl.h... -I../otcl-1.13
checking for libotcl1.13... no
configure: error: Installation of otcl seems incomplete or can't be found automa
tically.
Please correct the problem by telling configure where otcl is
using the argument --with-otcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-otcl=no.


请问这些问题是由于什么引起的,该如何解决?
...全文
2313 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengzhilvfys 2011-08-23
  • 打赏
  • 举报
回复
请问那个在win7下成功安装NS2的,麻烦有时间写个详细的教程,谢谢。
mmmmmmmmnnnnxx 2011-06-15
  • 打赏
  • 举报
回复
第二个问题有人解决了吗?
confidence2010 2011-06-09
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 cj_guangtou 的回复:]
8楼 是牛人啊 我也是第一个问题 加了那段代码那个问题就解决了,不过后来出现了Ns make failed!
但是之前那个问题的办法应该是对的 谢谢
[/Quote]

你最后出现的那个Ns make failed.是如何解决的呀??在线等。谢啦!
confidence2010 2011-06-09
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 cj_guangtou 的回复:]
8楼 是牛人啊 我也是第一个问题 加了那段代码那个问题就解决了,不过后来出现了Ns make failed!
但是之前那个问题的办法应该是对的 谢谢
[/Quote]

你第二个问题怎么解决的呀?
confidence2010 2011-06-09
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 dmdream 的回复:]
Ans to Q2:
'cause you are installing ns by ns-all-in-one, the prerequisite conditions that tcl, tk and etc are intalled are not satisfied. But by ./install, the script will help you intall(compile and link) those softwares before compiling ns.
[/Quote]
这个该怎么解决啊?
CJ_Guangtou 2011-03-26
  • 打赏
  • 举报
回复
8楼 是牛人啊 我也是第一个问题 加了那段代码那个问题就解决了,不过后来出现了Ns make failed!
但是之前那个问题的办法应该是对的 谢谢
dmdream 2011-03-11
  • 打赏
  • 举报
回复
Ans to Q1:
in file ns-allinone-2.34/tcl8.4.18/unix/tclUnixTime.c, structure timezone is not defined, so you have to input a definition yourself in the begingging of the file.

// to prevent compiling error dmd_daniel 2011-3-11
#ifndef TIMEZONE_DEFINED_
#define TIMEZONE_DEFINED_
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif
// end

save and quit, ./install
ns is then compiled ok.

Ans to Q2:
'cause you are installing ns by ns-all-in-one, the prerequisite conditions that tcl, tk and etc are intalled are not satisfied. But by ./install, the script will help you intall(compile and link) those softwares before compiling ns.
fangof 2011-03-04
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 xxn1023 的回复:]

安装cygwin时,需要安装ns2需要的包:

gcc
gcc-g++
gnuplot
make
patch
perl
tar
X-startup-scripts
xorg-x11-base
xorg-x11-bin
xorg-x11-devel
xorg-x11-bin-dlls
xorg-x11-bin-lndir
xorg-x11-etc
xorg-x1……
[/Quote]
我感觉这些库我都装了,但是./configure 之后也出现说configure: error: Installation of otcl seems incomplete or can't be found automa
tically.
Please correct the problem by telling configure where otcl is
using the argument --with-otcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-otcl=no.
longdeliu 2010-08-02
  • 打赏
  • 举报
回复
找不到解决方法 同问高手
DXW19850806 2010-06-22
  • 打赏
  • 举报
回复
关键是如何解决,上面说的这些有什么用啊!ns2解决个问题可真难,在网上搜了2天都找不到解决方法,难道没有高人?
xxn1023 2010-05-11
  • 打赏
  • 举报
回复
安装cygwin时,需要安装ns2需要的包:

gcc
gcc-g++
gnuplot
make
patch
perl
tar
X-startup-scripts
xorg-x11-base
xorg-x11-bin
xorg-x11-devel
xorg-x11-bin-dlls
xorg-x11-bin-lndir
xorg-x11-etc
xorg-x11-fenc
xorg-x11-fnts
xorg-x11-libs-data
xorg-x11-xwin
linglongyouzhi 2010-05-10
  • 打赏
  • 举报
回复
问题二:otcl没有安装?

看上去是相关的库没有安装啊
geekster 2010-04-27
  • 打赏
  • 举报
回复
建议楼主投奔Linux

4,358

社区成员

发帖
与我相关
我的任务
社区描述
通信技术相关讨论
社区管理员
  • 网络通信
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧