NS2安装错误系列(1)

NS错误系列
proxytrace2any.cc: In function `int main(int, char**)':
proxytrace2any.cc:112: error: `IsLittleEndian' undeclared (first use this
function)
proxytrace2any.cc:112: error: (Each undeclared identifier is reported only
once for each function it appears in.)
proxytrace2any.cc:120: error: `ToOtherEndian' undeclared (first use this
function)
make[1]: *** [proxytrace2any.o] Error 1
make[1]: Leaving directory `/home/ns-2.29/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/ns-2.29/indep-utils/webtrace-conv/epa'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ns-2.29/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/ns-2.29/indep-utils/webtrace-conv/nlanr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ns-2.29/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/ns-2.29/indep-utils/webtrace-conv/ucb'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ns-2.29/indep-utils/webtrace-conv/ucb'
 
 
解答一:我试了下,貌似不行。
这个问题在NS2.30上添加MFlood协议也会出现,报错的地方只是编译上出错,如果不修改这个错误并不影响使用。可以用以 下的方法来解决这个错误:

修改proxytrace2any.cc文件,在其中的main函数之前,添加

extern int IsLittleEndian(void);

extern void ToOtherEndian(TEntry *e ) ;

存盘退出,重新编译 make 一次

解法二:

对于这个问题,已经找打了解答,希望能为同样寻找答案的同学有所帮助/

首先,这个错误并不影响使用,至少我还没遇见什么其他的错误,不解决也没问题,可能是一些linkage errors

另外,如果想去掉这个错误,可以加上如下代码:

int IsLittleEndian(void);
void ToOtherEndian(TEntry *e); 
in .../ns-2.31/indep-utils/webtrace-conv/dec/Proxytrace2any.cc
 
这是网上一个不认识的热心人告诉我的,我试了一下,果然没错误了
 
解法三:

把in .../ns-2.31/indep-utils/webtrace-conv/dec/my-endian.h中的预编译指令改一下就可以了

#ifndef _ENDIAN_H_
#define _ENDIAN_H_

改成

#ifndef _ENDIAN_HHHH_
#define _ENDIAN_HHHH_

或者你认为的任意不会发生冲突的宏

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值