<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Without seeing actual code, I will not be able to say for sure what's going on (you need at least share a small snippet that shows the error).  One obvious thing is that you're using the same names as Consumer/Producer app in ndnSIM.  Unless you're using a dedicated namespace in your extension, this definitely should cause issues.</div><div class=""><br class=""></div><div class="">--</div><div class="">Alex</div><br class=""><div><blockquote type="cite" class=""><div class="">On May 28, 2016, at 1:05 AM, Muhammad Hosain Abdollahi Sabet <<a href="mailto:mhasabet@gmail.com" class="">mhasabet@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:tahoma,sans-serif">​Hello everyone,<br class=""><br class=""></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 class=""><br class=""><blockquote class="">TypeId<br class="">Consumer::GetTypeId()<br class="">{<br class="">  static TypeId tid = TypeId ("Consumer")<br class="">          .SetGroupName("Ndn")<br class="">          .SetParent<ndn::App>()<br class="">          .AddConstructor<Consumer>()<br class="">          .AddAttribute("Prefix","Prefix, for which consumer sends interest", StringValue("/"),<br class="">                        ndn::MakeNameAccessor(&Consumer::m_interestName),<br class="">                        ndn::MakeNameChecker())<br class="">          .AddAttribute("Hint","Forwarding Hint Name",<br class="">                        StringValue("/"),<br class="">                        MakeStringAccessor(&Consumer::m_linkName),<br class="">                        MakeStringChecker())<br class="">          .AddAttribute("HasLink","Does this app use Link?",<br class="">                        BooleanValue(false),<br class="">                        MakeBooleanAccessor(&Consumer::m_hasLink),<br class="">                        MakeBooleanChecker())<br class="">          .AddAttribute("LifeTime", "Interest Life Time",<br class="">                        StringValue("2s"),<br class="">                        MakeTimeAccessor(&Consumer::m_interestLifeTime),<br class="">                        MakeTimeChecker());<br class=""><br class="">  return tid;<br class="">}<br class=""></blockquote><br class=""><br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">And the other one is:<br class=""><br class=""><div style="margin-left:40px" class="">TypeId<br class="">Producer::GetTypeId(){<br class="">    static TypeId tid = TypeId ("Producer")<br class="">            .SetGroupName("Ndn")<br class="">            .SetParent<ndn::App>()<br class="">            .AddConstructor<Producer>()<br class="">             .AddAttribute("Prefix", "Prefix, for which producer has the data", StringValue("/"),<br class="">                          MakeNameAccessor(&Producer::m_prefix),<br class="">                          ndn::MakeNameChecker())<br class="">             .AddAttribute("LinkName", "The Name of Forwarding Hint", StringValue("/"),<br class="">                          MakeNameAccessor(&Producer::m_linkName),<br class="">                          ndn::MakeNameChecker())<br class="">             .AddAttribute("PayloadSize", "Virtual payload size for Content packets", UintegerValue(1024),<br class="">                          MakeUintegerAccessor(&Producer::m_virtualPayloadSize),<br class="">                          MakeUintegerChecker<uint32_t>())<br class="">             .AddAttribute("Freshness", "Freshness of data packets, if 0, then unlimited freshness",<br class="">                          TimeValue(Seconds(0)), MakeTimeAccessor(&Producer::m_freshness),<br class="">                          MakeTimeChecker())<br class="">             .AddAttribute("Signature","Fake signature, 0 valid signature (default), other values application-specific",<br class="">                          UintegerValue(0),<br class="">                          MakeUintegerAccessor(&Producer::m_signature),<br class="">                          MakeUintegerChecker<uint32_t>())<br class="">             .AddAttribute("KeyLocator","Name to be used for key locator.  If root, then key locator is not used",<br class="">                          ndn::NameValue(),<br class="">                          MakeNameAccessor(&Producer::m_keyLocator),<br class="">                          ndn::MakeNameChecker())<br class="">             .AddAttribute("HasLink","Define if the Producer uses Link",<br class="">                          BooleanValue(false),<br class="">                          MakeBooleanAccessor(&Producer::m_hasLink),<br class="">                          MakeBooleanChecker());<br class="">            ;<br class="">    return tid;<br class="">}<br class=""></div><br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">​Producer is ok. But in ​Linking the other one I'm receiving:<br class=""><br class=""><div style="margin-left:40px" class="">extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::StringValue>::Set(ns3::ObjectBase*, ns3::AttributeValue const&) const':<br class="">/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:183: undefined reference to `typeinfo for ns3::Consumer'<br class="">extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::StringValue>::Get(ns3::ObjectBase const*, ns3::AttributeValue&) const':<br class="">/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:209: undefined reference to `typeinfo for ns3::Consumer'<br class="">extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::ndn::NameValue>::Set(ns3::ObjectBase*, ns3::AttributeValue const&) const':<br class="">/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:183: undefined reference to `typeinfo for ns3::Consumer'<br class="">extensions/Consumer.cpp.1.o: In function `ns3::AccessorHelper<ns3::Consumer, ns3::ndn::NameValue>::Get(ns3::ObjectBase const*, ns3::AttributeValue&) const':<br class="">/usr/local/include/ns3-dev/ns3/attribute-accessor-helper.h:209: undefined reference to `typeinfo for ns3::Consumer'<br class="">extensions/Consumer.cpp.1.o: In function `ns3::TypeId ns3::TypeId::AddConstructor<ns3::Consumer>()::Maker::Create()':<br class="">/ndnSIM/custom-scenario/link/build/../extensions/Consumer.hpp:22: undefined reference to `vtable for ns3::Consumer'<br class="">collect2: error: ld returned 1 exit status<br class=""></div><br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The <i class="">.hpp</i>s are also pretty much the same. I've copied the ndn-custom-app and modified it.<br class=""><br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Anyone has and idea what is wrong?<br class=""><br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks,<br class=""></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Sabet<br class=""></div><br class=""></div>
_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></body></html>