在ns 2.34上添加mp-olsr时发生编译错误(Jiazi YI ns 2.29) [英] Compilation error while adding mp-olsr on ns 2.34 (Jiazi YI ns 2.29)

查看:132
本文介绍了在ns 2.34上添加mp-olsr时发生编译错误(Jiazi YI ns 2.29)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将mp-olsr(ns 2.29)添加到ns 2.34中,并且在编译时遇到一些错误。

I'm trying to add the mp-olsr(ns 2.29) into ns 2.34 and I'm getting some errors while compiling it.

源代码(贾兹YI): http://www.jiaziyi.com/index.php/research-projects/mp-olsr

Source code(Jiazi YI): http://www.jiaziyi.com/index.php/research-projects/mp-olsr

程序:


$ touch common / packet.cc

$ make

$ touch common/packet.cc
$ make

结果:


mpolsr / MPOLSR.o:在函数 MPOLSR :: MPOLSR中(int)':

MPOLSR.cc:(.text+0x1457):未定义对
Agent :: Agent(packet_t)的引用

mpolsr / MPOLSR.o:在函数 MPOLSR :: MPOLSR(int)':

MPOLSR.cc:(.text+0x16f1):对
Agent的未定义引用::: Agent(packet_t)'

collect2:ld返回1个退出状态

make:** [ns]错误1

mpolsr/MPOLSR.o: In function MPOLSR::MPOLSR(int)':
MPOLSR.cc:(.text+0x1457): undefined reference to
Agent::Agent(packet_t)'
mpolsr/MPOLSR.o: In function MPOLSR::MPOLSR(int)':
MPOLSR.cc:(.text+0x16f1): undefined reference to
Agent::Agent(packet_t)'
collect2: ld returned 1 exit status
make: ** [ns] Erro 1

我可能错过了什么?

推荐答案

为了解决我的错误,我修改了MPOLSR.cc中的以下内容:

In order to solve my error I modified the following in MPOLSR.cc:

发件人:


MPOLSR :: MPOLSR(nsaddr_t id):代理(PT_MPOLSR),

hello_timer_(this),

tc_timer_(this),

mid_timer_(this){

To(所有内容都在一行上):

To(everything on a single line):

MPOLSR :: MPOLSR(nsaddr_t id):Agent(PT_MPOLSR),hello_timer_(this),tc_timer_(this),mid_timer_(this){

我知道这听起来很傻,但是它解决了问题。

I know it sounds silly, but it resolved the problem.

这篇关于在ns 2.34上添加mp-olsr时发生编译错误(Jiazi YI ns 2.29)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆