admin 管理员组

文章数量: 1086019


2024年4月17日发(作者:精通学堂专升本)

ns-allinone-2.27 安装错误集锦

问题:

checking system version (for dynamic loading)... ./configure: line 7624: syntax

error near unexpected token `)'

./configure: lline 7624: ` OSF*)'

tcl8.3.2 configuration failed! Exiting ...

解决:

把以下文件中的.relid'`替换成.relid`:

ns-allinone-2.27tcl8.4.5unixconfigure

ns-allinone-2.27tcl8.4.5unixtcl.m4

ns-allinone-2.27tk8.4.5unixconfigure

ns-allinone-2.27tk8.4.5unixtcl.m4

ns-allinone-2.27otcl-1.8configure

问题:

clcl-mappings.h: In static member function `static int

TclObjectHelper::dispatch_(void*, Tcl_Interp*, int, char**)':

tclcl-mappings.h:51: error: incomplete type `Tcl' used in nested name specifier

tclcl-mappings.h:52: error: invalid use of undefined type `struct Tcl'

tclcl-mappings.h:41: error: forward declaration of `struct Tcl'

tclcl-mappings.h:57: error: invalid use of undefined type `struct Tcl'

tclcl-mappings.h:41: error: forward declaration of `struct Tcl'

make: *** [Tcl.o] Error 1

tclcl-1.15 make failed! Exiting

解决:

下载对应的gcc的安装布丁,然后再安装。把补丁放在和ns-allinone-2.27同一个目录下

面进行如下操作:

1. get a fresh

2. tar zxvf

3. patch -p0 <

4. cd ns-allinone-2.27

5. ./install

问题:

./sctp/sctp.h:632: 错误:有多余的限定‘SctpAgent::’在成员‘DumpSendBuffer’上

trace/:185: 警告:不建议使用从字符串常量到‘char*’的转换

trace/:185: 警告:不建议使用从字符串常量到‘char*’的转换

trace/:185: 警告:不建议使用从字符串常量到‘char*’的转换

trace/:185: 警告:不建议使用从字符串常量到‘char*’的转换

trace/:185: 警告:不建议使用从字符串常量到‘char*’的转换

make: *** [trace/trace.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/sctp/sctp.h

void SctpAgent::DumpSendBuffer();

改为:void DumpSendBuffer();

问题:

./mobile/god.h: At global scope:

./mobile/god.h:88: 错误:有多余的限定‘vector::’在成员‘operator=’上

./mobile/god.h:93: 错误:有多余的限定‘vector::’在成员‘operator+=’上

./mobile/god.h:98: 错误:有多余的限定‘vector::’在成员‘operator==’上

./mobile/god.h:101: 错误:有多余的限定‘vector::’在成员‘operator!=’上

make: *** [src_rtg/sragent.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/mobile/god.h

inline void vector::operator=(const vector a)

inline void vector::operator+=(const vector a)

inline int vector::operator==(const vector a)

inline int vector::operator!=(const vector a)

改为:

inline void operator=(const vector a)

inline void operator+=(const vector a)

inline int operator==(const vector a)

inline int operator!=(const vector a)

问题:

queue/:112: 错误:ISO C++ 不允许声明无类型的‘CBQueue’

queue/:112: 错误:expected ‘;’ before ‘*’ token

queue/: In member function ‘virtual int

CBQueue::insert_class(CBQClass*)’:

queue/:488: 错误:‘class CBQClass’没有名为‘cbq_’的成员

queue/: In constructor ‘CBQClass::CBQClass()’:

queue/:805: 错误:类‘CBQClass’没有名为‘cbq_’的字段

queue/: In member function ‘virtual void CBQClass::recv(Packet*,

Handler*)’:

queue/:850: 错误:‘cbq_’在此作用域中尚未声明

queue/:856: 错误:‘cbq_’在此作用域中尚未声明

queue/: In member function ‘void CBQClass::update(Packet*, double)’:

queue/:873: 错误:‘cbq_’在此作用域中尚未声明

queue/: In member function ‘int CBQClass::desc_with_demand()’:

queue/:928: 错误:‘cbq_’在此作用域中尚未声明

queue/: In member function ‘void CBQClass::newallot(double)’:

queue/:975: 错误:‘cbq_’在此作用域中尚未声明

queue/: In member function ‘virtual int CBQClass::command(int, const

char* const*)’:

queue/:1002: 错误:‘cbq_’在此作用域中尚未声明

make: *** [queue/cbq.o] 错误 1

Ns make failed!

解决:(+就是添加,-就是去掉咯)

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/queue/

#define POWEROFTWO 16

+class CBQueue;

class CBQClass : public Connector {

问题:

./tora/tora_neighbor.h:72: 错误:ISO C++ 不允许声明无类型的‘toraAgent’

./tora/tora_neighbor.h:72: 错误:expected ‘;’ before ‘*’ token

tora/: In member function ‘void toraAgent::rt_resolve(Packet*)’:

tora/:238: 警告:不建议使用从字符串常量到‘char*’的转换

tora/: In member function ‘void toraAgent::recvUPD(Packet*)’:

tora/:462: 警告:不建议使用从字符串常量到‘char*’的转换

tora/: In member function ‘void toraAgent::recvCLR(Packet*)’:

tora/:648: 警告:不建议使用从字符串常量到‘char*’的转换

make: *** [tora/tora.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/tora/tora_neighbor.h

#define __tora_neighbor_h__

+class toraAgent;

enum LinkStatus {

问题:

dsr/:787: 错误:‘XmitFlowFailureCallback’在此作用域中尚未声明

dsr/:1344: 错误:‘XmitFailureCallback’在此作用域中尚未声明

make: *** [dsr/dsragent.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/dsr/

+void XmitFlowFailureCallback(Packet *pkt, void *data);

+void XmitFailureCallback(Packet *pkt, void *data);

/*===========================================================================

SendBuf management and helpers

问题:

diffusion/:404: 错误:‘XmitFailedCallback’在此作用域中尚未声明

make: *** [diffusion/diffusion.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/diffusion/

#include "routing_table.h"

+void XmitFailedCallback(Packet *pkt, void *data);

char *MsgStr[]= {"", "INTEREST", "DATA", "DATA_READY", "DATA_REQUEST",

问题:

diffusion/omni_:367: 错误:‘OmniMcastXmitFailedCallback’在此作用域中

尚未声明

make: *** [diffusion/omni_mcast.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/diffusion/omni_

#include "god.h"

+void OmniMcastXmitFailedCallback(Packet *pkt, void *data);

static class OmniMcastClass : public TclClass {

问题:

tcp/:68: 错误:有多余的限定‘SackRHTcpAgent::’在成员‘newack’上

make: *** [tcp/tcp-sack-rh.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/tcp/

virtual void computefack();

//virtual void SackRHTcpAgent::newack(Packet* pkt);

+virtual void newack(Packet *pkt);

问题:

pgm/:278: 错误:有多余的限定‘PgmAgent::’在成员‘trace_event’上

pgm/: In member function ‘void PgmAgent::handle_rdata(Packet*)’:

pgm/:578: 警告:不建议使用从字符串常量到‘char*’的转换

pgm/: In member function ‘void PgmAgent::handle_nak(Packet*)’:

pgm/:727: 警告:不建议使用从字符串常量到‘char*’的转换

pgm/: In member function ‘void PgmAgent::handle_ncf(Packet*)’:

pgm/:824: 警告:不建议使用从字符串常量到‘char*’的转换

make: *** [pgm/pgm-agent.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/pgm/

void print_stats();

-//void PgmAgent::trace_event(char *evType, double evTime);

+void trace_event(char *evType, double evTime);

问题:

pgm/:160: 错误:有多余的限定‘PgmSender::’在成员‘trace_event’上

pgm/: In member function ‘virtual void

PgmSender::handle_nak(Packet*)’:

pgm/:472: 警告:不建议使用从字符串常量到‘char*’的转换

pgm/: In member function ‘virtual void

PgmSender::send_rdata(RdataItem*)’:

pgm/:619: 警告:不建议使用从字符串常量到‘char*’的转换

make: *** [pgm/pgm-sender.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/pgm/

-//void PgmSender::trace_event(char *evType, nsaddr_t daddr, double evTime);

+void trace_event(char *evType, nsaddr_t daddr, double evTime);

问题:

pgm/:157: 错误:有多余的限定‘PgmReceiver::’在成员

‘trace_event’上

pgm/: In member function ‘void

PgmReceiver::generate_Nak(int)’:

pgm/:589: 警告:不建议使用从字符串常量到‘char*’的转换

make: *** [pgm/pgm-receiver.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/pgm/

-void PgmReceiver::trace_event(char *evType, double evTime);

+void trace_event(char *evType, double evTime);

问题:

./diffusion3/filter_core/filter_:111: 错误:expected `)' before ‘*’

token

make: *** [diffusion3/ns/diffagent.o] 错误 1

Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/diffusion3/filter_core/filter_

class NeighborEntry;

+class DiffRoutingAgent;

typedef list NeighborList;


本文标签: 安装 声明 建议 使用