ns-allinone-2.34 安装错误集锦

安装必须的软件环境:
$ sudo apt-get install build-essential autoconf automake libxmu-dev
$ sudo apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev
$ sduo apt-get install libxmu-dev libxmu-headers

 注:ns-allinone-2.30以上版本是没有例子的可以从低版本上下如2.8;

**************以下转自http://blog.163.com/menghaijunhenan@126/blog/static/11243759620096213484159/*****************

1.首先ubuntu 8.04安装后,系统中gcc是不能用来的开发的,只有一个空壳,所以需要重新安装gcc。
先用命令: sudo apt-get remove gcc

然后 : $sudo apt -get install build-essential

$ sudo apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev
$ sduo apt-get install libxmu-dev libxmu-headers

2.在新立得软件包管理器中下载最新的NS2.34,下载结束后解压安装(我解压在根目录中)
$ tar -xzvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34
$./install

*注意当出现类似tk8.4.18,安装中断退出时,先输入:sudo apt-cache search x11-dev
得到类似以下信息:
libgl1-mesa-swx11-dev - A free implementation of the OpenGL API -- development files
libx11-dev - X11 client-side library (development headers)
libghc6-x11-dev - Haskell X11 binding for GHC
libgtkglextmm-x11-dev - C++ wrapper for the OpenGL Extension to GTK (development files)
分别安装上面的组件(更新为最新版本,当然如果已经是最新版本的话,它会提醒),命令如下:
sudo apt-get install libx11-dev
sudo apt-get install libgl1-mesa-swx11-dev
sudo apt-get install libghc6-x11-dev
sudo apt-get install libgtkglextmm-x11-dev

3.重新安装

$ cd ns-allinone-2.34
$./install

4.如果安装成功,系统会在末尾提示你进行相关环境变量的设置
5. 设置环境变量
方法1:
export
PATH="$PATH:/home/menghaijun/ns-allinone-2.34/bin:/homemenghaijun/ns-allinone-2.34/tcl8.4.18/unix:/home/ns2/ns-allinone-2.34/tk8.4.18/unix"
export
LD_LIBRARY_PATH="/home/menghaijun/ns-allinone-2.34/otcl-1.13:/home/menghaijun/ns-allinone-2.34/lib"
export
TCL_LIBRARY="$TCL_LIBRARY:/home/menghaijun/ns-allinone-2.34/tcl8.4.18/library"
方法2:
修改 .bashrc 文件
重新打开一个终端,进行如下操作:
menghaijun@menghaijun-laptop:~$ sudo gedit ~/.bashrc
在文件末尾添加如下命令:
PATH="$PATH:/home/menghaijun/ns-allinone-2.34/bin:/home/menghaijun/ns-allinone-2.34/tcl8.4.18/unix:/home/menghaijun/ns-allinone-2.34/tk8.4.18/unix"
LD_LIBRARY_PATH="/menghaijun/ns-allinone-2.34/otcl-1.13:/home/menghaijun/ns-allinone-2.34/lib"
TCL_LIBRARY="$TCL_LIBRARY:/home/menghaijun/ns-allinone-2.34/tcl8.4.18/library"
保存即可。

6. 验证

(1)在终端下输入

cd ns-2.34
./validat

(2)终端输入NS,查看是否出现%,如果已经出现则表示安装成功。

如果你在终端下键入“ns”,可能会出现下面的错误提示:
The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install host 
Make sure you have the 'universe' component enabled
bash: ns: command not found
这可能是因为你的环境变量尚未设置好。确定你的~/.bashrc文件设置正确,并被写入进~
/.bashrc中了。如果还不行,那就重启一下电脑。

附加:

后续问题:安装成功后运行,终端输入ns后在%后输入nam,没有方框弹出
解决方案:
先手动编译nam生成可执行文件nam
进入ns-allinone-2.34/nam-1.14,输入命令:make
结果显示错误:
xwd.c:87:29: 错误: X11/Xmu/WinUtil.h:No such file or directory
make: *** [xwd.o] 错误 1
问题是xmu没有安装,于是再装xmu,
命令为:
sudo apt-get install libxmu-dev

安装成功后,再输入make进行编译,完成后在ns-allinone-2.34/nam-1.14中,将可执行文件nam复制到ns-allinone-2.34/bin/目录下,这样由于$PATH环境变量中有ns-allinone-2.34/bin项,nam就可以直接运行了。

*************以上转自http://blog.163.com/menghaijunhenan@126/blog/static/11243759620096213484159/*****************

 

 

************以下转自http://hi.baidu.com/jerry_916/blog/item/e0e7085516213d51d009065b.html**************************

1、关于不同版本ns2的安装出现的问题的解决方案(此处就ns2.27,2.29,2.31,2.33,2.34作解)

若在ubuntu上安装ns2要先装几个库文件:

(1)sudo apt-get install build-essential,这样可以安装gcc,make。

(2)安装tk,tcl

sudo apt-get install tcl8.4

sudo apt-get install tcl8.4-dev

sudo apt-get install tk8.4

sudo apt-get install tk8.4-dev

(3)sudo apt-get install libxmu-dev,是和nam有关的东西。完毕。

以下部分为各版本安装攻略,如有疑问,欢迎留言。。。

1) ns-2.27安装
问题(1)提示Syntax error: Unterminated quoted string,导致tcl,tk,otcl不能安装的问题
(这个问题是因gcc对语法要求更加严格,其他版本也会出现这个问题,解决办法同此)
安装中提示如下错误:
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string tcl8.3.2 configuration failed! Exiting
solution:
终端中,依次输入以下命令,将显示的对应的文件位置的system=MP-RAS-`awk '{print }' /etc/.relid'` 更改为system=MP-RAS-`awk '{print }' /etc/.relid`(即去掉后面的')
grep 'system=MP-RAS-' */* -n
grep 'system=MP-RAS-' */*/* -n
grep 'system=MP-RAS-' */*/*/* -n
然后根据索引到的文件一个一个更改过来。
即分别进入以下目录:
tcl8.x.x/unix/tcl.m4.
tk8.x.x/unix/tcl.m4.
otcl-1.x/configure.in.
将这些文件里的system=MP-RAS-`awk ' { print $3  } '/etc/.relid'` 改为:
system=MP-RAS-`awk ' { print $3 } '/etc/.relid` 

问题(2)
tclcl-mappings.h:51: error: incomplete type ‘Tcl’ used in nested name specifier
tclcl-mappings.h:52: error: invalid use of incomplete type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
tclcl-mappings.h:57: error: invalid use of incomplete type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
make: *** [Tcl.o] Error 1
tclcl-1.15 make failed! Exiting ...

solution:patch -p0 < ns227-gcc34.patch
问题(3)参见ns-2.29所列问题(1),(2),(3),(4),(9),(5),(6),(7),(8)。
问题(4)
queue/cbq.cc:112: error: ISO C++ forbids declaration of ‘CBQueue’ with no type
queue/cbq.cc:112: error: expected ‘;’ before ‘*’ token
queue/cbq.cc: In member function ‘virtual int CBQueue::insert_class(CBQClass*)’:
queue/cbq.cc:488: error: ‘class CBQClass’ has no member named ‘cbq_’
queue/cbq.cc: In constructor ‘CBQClass::CBQClass()’:
queue/cbq.cc:805: error: class ‘CBQClass’ does not have any field named ‘cbq_’
queue/cbq.cc: In member function ‘virtual void CBQClass::recv(Packet*, Handler*)’:
queue/cbq.cc:850: error: ‘cbq_’ was not declared in this scope
queue/cbq.cc:856: error: ‘cbq_’ was not declared in this scope
queue/cbq.cc: In member function ‘void CBQClass::update(Packet*, double)’:
queue/cbq.cc:873: error: ‘cbq_’ was not declared in this scope
queue/cbq.cc: In member function ‘int CBQClass::desc_with_demand()’:
queue/cbq.cc:928: error: ‘cbq_’ was not declared in this scope
queue/cbq.cc: In member function ‘void CBQClass::newallot(double)’:
queue/cbq.cc:975: error: ‘cbq_’ was not declared in this scope
queue/cbq.cc: In member function ‘virtual int CBQClass::command(int, const char* const*)’:
queue/cbq.cc:1002: error: ‘cbq_’ was not declared in this scope
make: *** [queue/cbq.o] Error 1
solution:
$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/queue/cbq.cc
#define POWEROFTWO 16
+class CBQueue;
class CBQClass : public Connector {
问题(5)
./tora/tora_neighbor.h:72: 错误:ISO C++ 不允许声明无类型的‘toraAgent’
./tora/tora_neighbor.h:72: 错误:expected ‘;’ before ‘*’ token
tora/tora.cc: In member function ‘void toraAgent::rt_resolve(Packet*)’:
tora/tora.cc:238: 警告:不建议使用从字符串常量到‘char*’的转换
tora/tora.cc: In member function ‘void toraAgent::recvUPD(Packet*)’:
tora/tora.cc:462: 警告:不建议使用从字符串常量到‘char*’的转换
tora/tora.cc: In member function ‘void toraAgent::recvCLR(Packet*)’:
tora/tora.cc:648: 警告:不建议使用从字符串常量到‘char*’的转换
make: *** [tora/tora.o] 错误 1
solution:$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/tora/tora_neighbor.h
#define __tora_neighbor_h__
+class toraAgent;
enum LinkStatus {
问题(6)
./diffusion3/filter_core/filter_core.hh:111: 错误:expected `)' before ‘*’ token
make: *** [diffusion3/ns/diffagent.o] 错误 1
solution:$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/diffusion3/filter_core/filter_core.hh
class NeighborEntry;
+class DiffRoutingAgent;
typedef list<NeighborEntry *> NeighborList;

2) ns-2.29 安装 (ps:解压ns2.29,修改nam文件夹中agent.h的73行,将null改为0)

问题(1) -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o  trace/trace.o  trace/trace.cc
./sctp/sctp.h:705: error: extra qualification  'SctpAgent::' on member  'DumpSendBuffer'
make: *** [trace/trace.o]  Error 1
solution:
将文件ns2.29/sctp.h里面第705行DumpSendBuffer函数前面的'SctpAgent::'去掉。

问题(2)
./mobile/god.h:88: error: extra qualification ‘vector::’ on member ‘operator=’
./mobile/god.h:93: error: extra qualification ‘vector::’ on member ‘operator+=’
./mobile/god.h:98: error: extra qualification ‘vector::’ on member ‘operator==’
./mobile/god.h:101: error: extra qualification ‘vector::’ on member ‘operator!=’
make: *** [src_rtg/sragent.o] Error 1
solution:
分别将这些文件里面的‘vector::'去掉。

问题(3)
dsr/dsragent.cc:828: error: ‘XmitFlowFailureCallback’ was not declared in this scope
dsr/dsragent.cc:1385: error: ‘XmitFailureCallback’ was not declared in this scope
dsr/dsragent.cc:1386: error: ‘XmitFlowFailureCallback’ was not declared in this scope
dsr/dsragent.cc:1403: error: ‘XmitFailureCallback’ was not declared in this scope
make: *** [dsr/dsragent.o] Error 1
solution:
It is unclear to me which version of the code and  compiler you are using. But it looks very similar to an error that I  encountered with the CVS version and the latest gcc version. You should look  into the file if you can find the missing function. In my case it was  declared at the endof the file without a forward declaration. If so , you just need to move it to the beginning of the file or add an forward  declaration for the function at the beginning.

$gedit /usr/NS2/ns-allinone-2.29/ns-2.29/dsr/dsragent.cc
+void XmitFlowFailureCallback(Packet *pkt, void *data);  //+即增加,-即去掉
+void XmitFailureCallback(Packet *pkt, void *data);
/*===========================================================================
SendBuf management and helpers

问题(4)
diffusion/diffusion.cc:427: error:‘XmitFailedCallback’ was not declared in this scope
make: *** [diffusion/diffusion.o] error 1
solution:
$gedit /usr/NS2/ns-allinone-2.29/ns-2.29/diffusion/diffusion.cc
#include "routing_table.h"
+void XmitFailedCallback(Packet *pkt, void *data);
char *MsgStr[]= {"", "INTEREST", "DATA", "DATA_READY", "DATA_REQUEST",

问题(5)
tcp/tcp-sack-rh.cc:68: 错误:有多余的限定 ‘SackRHTcpAgent::’在成员 ‘newack’ 上
make: *** [tcp/tcp-sack-rh.o] 错误 1
solution:
同问题(1)和(2)

问题(6)
pgm/pgm-agent.cc:307: 错误:有多余的限定 ‘PgmAgent::’ 在成员  ‘trace_event’ 上
make: *** [pgm/pgm-agent.o] 错误 1
solution:
同问题(1)

问题(7)
pgm/pgm-sender.cc:189: 错误:有多余的限定 ‘PgmSender::’ 在成员 ‘trace_event’ 上
make: *** [pgm/pgm-sender.o] 错误 1

问题(8)
pgm/pgm-receiver.cc:186: 错误:有多余的限定 ‘PgmReceiver::’在成员 ‘trace_event’ 上
make: *** [pgm/pgm-receiver.o] 错误 1

问题(9)
diffusion/omni_mcast.cc:367: 错误:‘OmniMcastXmitFailedCallback’在此作用域中尚未声明
make: *** [diffusion/omni_mcast.o] 错误 1
solution:$gedit /usr/NS2/ns-allinone-2.29/ns-2.29/diffusion/omni_mcast.cc
#include "god.h"
+void OmniMcastXmitFailedCallback(Packet *pkt, void *data);
static class OmniMcastClass : public TclClass {

3) ns-2.31,2.33,2.34安装
安装很顺利,推荐ing~~。

************以下转自http://hi.baidu.com/jerry_916/blog/item/e0e7085516213d51d009065b.html**************************

 

问题 1 :

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.27/tcl8.4.5/unix/configure
    ns-allinone-2.27/tcl8.4.5/unix/tcl.m4
    ns-allinone-2.27/tk8.4.5/unix/configure
    ns-allinone-2.27/tk8.4.5/unix/tcl.m4
    ns-allinone-2.27/otcl-1.8/configure

问题:

clcl-mappings.h: In static member function `static int TclObjectHelper<T>::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 ns-allinone-2.27.tar.gz
2. tar zxvf ns-allinone-2.27.tar.gz
3. patch -p0 < ns227-gcc34.patch
4. cd ns-allinone-2.27
5. ./install

问题:

./sctp/sctp.h:632: 错误:有多余的限定‘SctpAgent::’在成员‘DumpSendBuffer’上
trace/trace.cc:185: 警告:不建议使用从字符串常量到‘char*’的转换
trace/trace.cc:185: 警告:不建议使用从字符串常量到‘char*’的转换
trace/trace.cc:185: 警告:不建议使用从字符串常量到‘char*’的转换
trace/trace.cc:185: 警告:不建议使用从字符串常量到‘char*’的转换
trace/trace.cc: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/cbq.cc:112: 错误:ISO C++ 不允许声明无类型的‘CBQueue’
queue/cbq.cc:112: 错误:expected ‘;’ before ‘*’ token
queue/cbq.cc: In member function ‘virtual int CBQueue::insert_class(CBQClass*)’:
queue/cbq.cc:488: 错误:‘class CBQClass’没有名为‘cbq_’的成员
queue/cbq.cc: In constructor ‘CBQClass::CBQClass()’:
queue/cbq.cc:805: 错误:类‘CBQClass’没有名为‘cbq_’的字段
queue/cbq.cc: In member function ‘virtual void CBQClass::recv(Packet*, Handler*)’:
queue/cbq.cc:850: 错误:‘cbq_’在此作用域中尚未声明
queue/cbq.cc:856: 错误:‘cbq_’在此作用域中尚未声明
queue/cbq.cc: In member function ‘void CBQClass::update(Packet*, double)’:
queue/cbq.cc:873: 错误:‘cbq_’在此作用域中尚未声明
queue/cbq.cc: In member function ‘int CBQClass::desc_with_demand()’:
queue/cbq.cc:928: 错误:‘cbq_’在此作用域中尚未声明
queue/cbq.cc: In member function ‘void CBQClass::newallot(double)’:
queue/cbq.cc:975: 错误:‘cbq_’在此作用域中尚未声明
queue/cbq.cc: In member function ‘virtual int CBQClass::command(int, const char* const*)’:
queue/cbq.cc:1002: 错误:‘cbq_’在此作用域中尚未声明
make: *** [queue/cbq.o] 错误 1
Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/queue/cbq.cc

#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/tora.cc: In member function ‘void toraAgent::rt_resolve(Packet*)’:
tora/tora.cc:238: 警告:不建议使用从字符串常量到‘char*’的转换
tora/tora.cc: In member function ‘void toraAgent::recvUPD(Packet*)’:
tora/tora.cc:462: 警告:不建议使用从字符串常量到‘char*’的转换
tora/tora.cc: In member function ‘void toraAgent::recvCLR(Packet*)’:
tora/tora.cc: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/dsragent.cc:787: 错误:‘XmitFlowFailureCallback’在此作用域中尚未声明
dsr/dsragent.cc:1344: 错误:‘XmitFailureCallback’在此作用域中尚未声明
make: *** [dsr/dsragent.o] 错误 1
Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/dsr/dsragent.cc

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

/*===========================================================================
SendBuf management and helpers

问题:

diffusion/diffusion.cc:404: 错误:‘XmitFailedCallback’在此作用域中尚未声明
make: *** [diffusion/diffusion.o] 错误 1
Ns make failed!

解决:

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

#include "routing_table.h"
+void XmitFailedCallback(Packet *pkt, void *data);
char *MsgStr[]= {"", "INTEREST", "DATA", "DATA_READY", "DATA_REQUEST",

问题:

diffusion/omni_mcast.cc:367: 错误:‘OmniMcastXmitFailedCallback’在此作用域中尚未声明
make: *** [diffusion/omni_mcast.o] 错误 1
Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/diffusion/omni_mcast.cc

#include "god.h"
+void OmniMcastXmitFailedCallback(Packet *pkt, void *data);
static class OmniMcastClass : public TclClass {

问题:

tcp/tcp-sack-rh.cc:68: 错误:有多余的限定‘SackRHTcpAgent::’在成员‘newack’上
make: *** [tcp/tcp-sack-rh.o] 错误 1
Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/tcp/tcp-sack-rh.cc

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

问题:

pgm/pgm-agent.cc:278: 错误:有多余的限定‘PgmAgent::’在成员‘trace_event’上
pgm/pgm-agent.cc: In member function ‘void PgmAgent::handle_rdata(Packet*)’:
pgm/pgm-agent.cc:578: 警告:不建议使用从字符串常量到‘char*’的转换
pgm/pgm-agent.cc: In member function ‘void PgmAgent::handle_nak(Packet*)’:
pgm/pgm-agent.cc:727: 警告:不建议使用从字符串常量到‘char*’的转换
pgm/pgm-agent.cc: In member function ‘void PgmAgent::handle_ncf(Packet*)’:
pgm/pgm-agent.cc:824: 警告:不建议使用从字符串常量到‘char*’的转换
make: *** [pgm/pgm-agent.o] 错误 1
Ns make failed!

解决:

$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/pgm/pgm-agent.cc

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

问题:
pgm/pgm-sender.cc:160: 错误:有多余的限定‘PgmSender::’在成员‘trace_event’上
pgm/pgm-sender.cc: In member function ‘virtual void PgmSender::handle_nak(Packet*)’:
pgm/pgm-sender.cc:472: 警告:不建议使用从字符串常量到‘char*’的转换
pgm/pgm-sender.cc: In member function ‘virtual void PgmSender::send_rdata(RdataItem*)’:
pgm/pgm-sender.cc:619: 警告:不建议使用从字符串常量到‘char*’的转换
make: *** [pgm/pgm-sender.o] 错误 1
Ns make failed!

解决:
$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/pgm/pgm-sender.cc

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

问题:
pgm/pgm-receiver.cc:157: 错误:有多余的限定‘PgmReceiver::’在成员‘trace_event’上
pgm/pgm-receiver.cc: In member function ‘void PgmReceiver::generate_Nak(int)’:
pgm/pgm-receiver.cc:589: 警告:不建议使用从字符串常量到‘char*’的转换
make: *** [pgm/pgm-receiver.o] 错误 1
Ns make failed!

解决:
$gedit /usr/NS2/ns-allinone-2.27/ns-2.27/pgm/pgm-receiver.cc

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

问题:
./diffusion3/filter_core/filter_core.hh: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_core.hh

class NeighborEntry;
+class DiffRoutingAgent;
typedef list<NeighborEntry *> NeighborList;

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值