<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">​Hello everyone,<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Using <a class="" href="http://github.com/cawka/ndnSIM-scenario-template">http://github.com/cawka/ndnSIM-scenario-template</a>, I'm writing 2 custom applications. In TypeId they are pretty much the same:<br><br><blockquote>TypeId<br>Consumer::GetTypeId()<br>{<br>  static TypeId tid = TypeId ("Consumer")<br>          .SetGroupName("Ndn")<br>          .SetParent<ndn::App>()<br>          .AddConstructor<Consumer>()<br>          .AddAttribute("Prefix","Prefix, for which consumer sends interest", StringValue("/"),<br>                        ndn::MakeNameAccessor(&Consumer::m_interestName),<br>                        ndn::MakeNameChecker())<br>          .AddAttribute("Hint","Forwarding Hint Name",<br>                        StringValue("/"),<br>                        MakeStringAccessor(&Consumer::m_linkName),<br>                        MakeStringChecker())<br>          .AddAttribute("HasLink","Does this app use Link?",<br>                        BooleanValue(false),<br>                        MakeBooleanAccessor(&Consumer::m_hasLink),<br>                        MakeBooleanChecker())<br>          .AddAttribute("LifeTime", "Interest Life Time",<br>                        StringValue("2s"),<br>                        MakeTimeAccessor(&Consumer::m_interestLifeTime),<br>                        MakeTimeChecker());<br><br>  return tid;<br>}<br></blockquote><br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">And the other one is:<br><br><div style="margin-left:40px">TypeId<br>Producer::GetTypeId(){<br>    static TypeId tid = TypeId ("Producer")<br>            .SetGroupName("Ndn")<br>            .SetParent<ndn::App>()<br>            .AddConstructor<Producer>()<br>             .AddAttribute("Prefix", "Prefix, for which producer has the data", StringValue("/"),<br>                          MakeNameAccessor(&Producer::m_prefix),<br>                          ndn::MakeNameChecker())<br>             .AddAttribute("LinkName", "The Name of Forwarding Hint", StringValue("/"),<br>                          MakeNameAccessor(&Producer::m_linkName),<br>                          ndn::MakeNameChecker())<br>             .AddAttribute("PayloadSize", "Virtual payload size for Content packets", UintegerValue(1024),<br>                          MakeUintegerAccessor(&Producer::m_virtualPayloadSize),<br>                          MakeUintegerChecker<uint32_t>())<br>             .AddAttribute("Freshness", "Freshness of data packets, if 0, then unlimited freshness",<br>                          TimeValue(Seconds(0)), MakeTimeAccessor(&Producer::m_freshness),<br>                          MakeTimeChecker())<br>             .AddAttribute("Signature","Fake signature, 0 valid signature (default), other values application-specific",<br>                          UintegerValue(0),<br>                          MakeUintegerAccessor(&Producer::m_signature),<br>                          MakeUintegerChecker<uint32_t>())<br>             .AddAttribute("KeyLocator","Name to be used for key locator.  If root, then key locator is not used",<br>                          ndn::NameValue(),<br>                          MakeNameAccessor(&Producer::m_keyLocator),<br>                          ndn::MakeNameChecker())<br>             .AddAttribute("HasLink","Define if the Producer uses Link",<br>                          BooleanValue(false),<br>                          MakeBooleanAccessor(&Producer::m_hasLink),<br>                          MakeBooleanChecker());<br>            ;<br>    return tid;<br>}<br></div><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">​Producer is ok. But in ​Linking the other one I'm receiving:<br><br><div style="margin-left:40px">extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::StringValue>::Set(ns3::ObjectBase*, ns3::AttributeValue const&) const':<br>/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:183: undefined reference to `typeinfo for ns3::Consumer'<br>extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::StringValue>::Get(ns3::ObjectBase const*, ns3::AttributeValue&) const':<br>/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:209: undefined reference to `typeinfo for ns3::Consumer'<br>extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::ndn::NameValue>::Set(ns3::ObjectBase*, ns3::AttributeValue const&) const':<br>/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:183: undefined reference to `typeinfo for ns3::Consumer'<br>extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::ndn::NameValue>::Get(ns3::ObjectBase const*, ns3::AttributeValue&) const':<br>/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:209: undefined reference to `typeinfo for ns3::Consumer'<br>extensions/Consumer.cpp.1.o: In function `ns3::TypeId ns3::TypeId::AddConstructor<ns3::Consumer>()::Maker::Create()':<br>/ndnSIM/custom-scenario/link/build/../extensions/Consumer.hpp:22: undefined reference to `vtable for ns3::Consumer'<br>collect2: error: ld returned 1 exit status<br></div><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The <i>.hpp</i>s are also pretty much the same. I've copied the ndn-custom-app and modified it.<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Anyone has and idea what is wrong?<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks,<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Sabet<br></div><br></div>