Проблема в сборке модуля Aquasim в NS3 - PullRequest
0 голосов
/ 25 января 2020

Я получаю следующую ошибку при сборке aquasim

    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)

1 Ответ

0 голосов
/ 04 февраля 2020

попробуйте собрать ns3 в соответствии с этим, https://www.nsnam.org/wiki/HOWTO_build_old_versions_of_ns-3_on_newer_compilers

или предоставьте более подробную информацию о вашей версии NS3 и компиляторе G CC.

...