I want to create a new routing protocol,and I found a module named "sp-routing" from a website.It is a routing module that others used. Then when I want add it to my NS3,
pjf@pjf-virtual-machine:~/NS3/NS328$ ./waf build
Waf: Entering directory `/home/pjf/NS3/NS328/build'
[ 628/2757] Compiling install-ns3-header: ns3/sp-routing-helper.h
[ 629/2757] Compiling install-ns3-header: ns3/sp-routing.h
[ 630/2757] Compiling install-ns3-header: ns3/sp-routing-table.h
[ 946/2757] Processing gen-module-header: ns3/sp-routing-module.h
[1192/2757] Compiling src/sp-routing/helper/sp-routing-helper.cc
[1193/2757] Compiling src/sp-routing/model/sp-routing.cc
In file included from ./ns3/object-base.h:23:0,
from ./ns3/object.h:29,
from ./ns3/ipv4.h:24,
from ../src/sp-routing/model/sp-routing.cc:22:
./ns3/type-id.h: In instantiation of ‘static ns3::ObjectBase* ns3::TypeId::AddConstructor()::Maker::Create() [with T = ns3::ShortestPathRouting]’:
./ns3/type-id.h:659:3: required from ‘ns3::TypeId ns3::TypeId::AddConstructor() [with T = ns3::ShortestPathRouting]’
../src/sp-routing/model/sp-routing.cc:40:43: required from here
./ns3/type-id.h:656:34: error: invalid new-expression of abstract class type ‘ns3::ShortestPathRouting’
ObjectBase * base = new T ();
^
In file included from ../src/sp-routing/model/sp-routing.cc:27:0:
../src/sp-routing/model/sp-routing.h:30:7: note: because the following virtual functions are pure within ‘ns3::ShortestPathRouting’:
functions are pure within ‘ns3::ShortestPathRouting’:
class ShortestPathRouting : public Ipv4RoutingProtocol
^
In file included from ./ns3/ipv4-static-routing.h:33:0,
from ../src/sp-routing/model/sp-routing.cc:26:
./ns3/ipv4-routing-protocol.h:172:16: note: virtual void ns3::Ipv4RoutingProtocol::PrintRoutingTable(ns3::Ptr<ns3::OutputStreamWrapper>, ns3::Time::Unit) const
virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit unit = Time::S) const = 0;