是否有人用ns-3.29嵌入了Aqua-sim-ng?

时间:2019-07-02 18:20:48

标签: c++ ns-3

我曾尝试用ns-3.29配置aqua-sim-ng(根据aqua-sim-ng文档只能在ns-3.25,ns-3.26和ns-3.27上工作)。我在下面收到一个编译错误。请帮助我如何解决这些编译错误。

In file included from ../src/aqua-sim-ng/model/aqua-sim-phy.h:29:0,
                 from ../src/aqua-sim-ng/model/aqua-sim-net-device.h:38,
                 from ../src/aqua-sim-ng/model/aqua-sim-routing.h:35,
                 from ../src/aqua-sim-ng/model/aqua-sim-routing-vbf.h:24,
                 from ../src/aqua-sim-ng/model/aqua-sim-routing-vbf.cc:21:
../src/aqua-sim-ng/model/aqua-sim-channel.h:67:20: error: conflicting return type specified for ‘virtual uint32_t ns3::AquaSimChannel::GetNDevices() const’
   virtual uint32_t GetNDevices (void) const;
                    ^
In file included from ../src/aqua-sim-ng/model/aqua-sim-channel.h:24:0,
                 from ../src/aqua-sim-ng/model/aqua-sim-phy.h:29,
                 from ../src/aqua-sim-ng/model/aqua-sim-net-device.h:38,
                 from ../src/aqua-sim-ng/model/aqua-sim-routing.h:35,
                 from ../src/aqua-sim-ng/model/aqua-sim-routing-vbf.h:24,
                 from ../src/aqua-sim-ng/model/aqua-sim-routing-vbf.cc:21:
./ns3/channel.h:68:23: error:   overriding ‘virtual std::size_t ns3::Channel::GetNDevices() const’
   virtual std::size_t GetNDevices (void) const = 0;
                   ^

Waf: Leaving directory `/home/jay/Desktop/ns-allinone-3.29/ns-3.29/build'
Build failed
 -> task in 'ns3-aqua-sim-ng' failed with exit status 1:
        {task 140292841097768: cxx aqua-sim-routing-vbf.cc -> aqua-sim-routing-vbf.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '../src/aqua-sim-ng/model/aqua-sim-routing-vbf.cc', '-c', '-o/home/jay/Desktop/ns-allinone-3.29/ns-3.29/build/src/aqua-sim-ng/model/aqua-sim-routing-vbf.cc.1.o']

1 个答案:

答案 0 :(得分:0)

类型uint32_tstd::size_t之间存在冲突。将uint32_tstd::size_t中所有aqua-sim-channel.h的出现更改为aqua-sim-channel.cc