首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在NS3中构建Aquasim模块的问题

在NS3中构建Aquasim模块的问题
EN

Stack Overflow用户
提问于 2020-01-25 20:56:54
回答 1查看 123关注 0票数 0

在构建aquasim时,我得到了以下错误

代码语言:javascript
运行
复制
    In file included from ./ns3/object-base.h:23:0,
                 from ./ns3/object.h:29,
                 from ./ns3/energy-source.h:30,
                 from ../src/aqua-sim-ng/model/aqua-sim-energy-model.cc:21:


    ./ns3/type-id.h: In instantiation of ‘static ns3::ObjectBase*     ns3::TypeId::AddConstructor()::Maker::Create() [with T = ns3::AquaSimEnergyModel]’:
    ./ns3/type-id.h:659:3:   required from ‘ns3::TypeId ns3::TypeId::AddConstructor() [with T = ns3::AquaSimEnergyModel]’
    ../src/aqua-sim-ng/model/aqua-sim-energy-model.cc:42:42:   required from here
    ./ns3/type-id.h:656:27: error: invalid new-expression of abstract class type   ‘ns3::AquaSimEnergyModel’


       ObjectBase * base = new T ();
                           ^~~~~~~~
    In file included from ../src/aqua-sim-ng/model/aqua-sim-energy-model.cc:26:0:
../src/aqua-sim-ng/model/aqua-sim-energy-model.h:45:7: note:   because the following virtual    functions are pure within ‘ns3::AquaSimEnergyModel’:
    class AquaSimEnergyModel : public DeviceEnergyModel
       ^~~~~~~~~~~~~~~~~~
    In file included from ./ns3/device-energy-model-container.h:26:0,
                 from ./ns3/energy-source.h:34,
                 from ../src/aqua-sim-ng/model/aqua-sim-energy-model.cc:21:

    ./ns3/device-energy-model.h:106:16: note:   virtual void   ns3::DeviceEnergyModel::HandleEnergyChanged()

     virtual void HandleEnergyChanged (void) = 0;
                ^~~~~~~~~~~~~~~~~~~

    Waf: Leaving directory `/home/udit/ns-allinone-3.30.1/ns-3.30.1/build'
    Build failed
    -> task in 'ns3-aqua-sim-ng' failed with exit status 1 (run with -v to display more   information)
EN

回答 1

Stack Overflow用户

发布于 2020-02-04 07:37:49

试着根据这个来构建ns3,https://www.nsnam.org/wiki/HOWTO_build_old_versions_of_ns-3_on_newer_compilers

或者,请提供您的NS3版本和GCC编译器的更多详细信息。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59909443

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档