<div dir="auto">Perhaps you are missing #include directives?  For example, names.h is where Names lives.<div dir="auto"><br></div><div dir="auto">Names is a class declared in ns3, and inside ns3 namespace.</div><div dir="auto"><br></div><div dir="auto">So ns3::Names::Find might work?</div><div dir="auto"><br></div><div dir="auto">And GlobalRoutingHelper is in ndn-global-routing-helper.h</div><div dir="auto"><br></div><div dir="auto">Does this help?</div><div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On May 23, 2017 4:37 AM, "任沛" <<a href="mailto:renpei.bupt@qq.com" target="_blank">renpei.bupt@qq.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi ndnSIM friends,</div><div><br></div><div>In NFD/daemon/fw/forwarder.cpp, i add below codes to the onIncomingData():</div><div><br></div><div><div>ns3::Ptr<ns3::Node> testNode = Names::Find<ns3::Node>(tNode);<br>ns3::ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br>ndnGlobalRoutingHelper.<wbr>AddOrigins(prefix, testNode);<br>ns3::ndn::GlobalRoutingHelper:<wbr>:CalculateRoutes();</div><div><br></div><div>where "tNode" and "prefix" above is in the form of std::string. What i tried to do is to tell all the another nodes that the current node can provide the content with specific prefix. While when i compile the source code, i got below message:</div><div><br></div><div>'Names' has not been declared</div><div>expected primary-expression before '>' token</div><div>'GlobalRoutingHelper' is not a member of 'ns3::ndn'</div><div>expected ';' before 'ndnGlobalRoutingHelper'</div><div>'ndnGlobalRoutingHelper' was not declareded in this scope</div><div>'ns3::ndn::<wbr>GlobalRoutingHelper' has not been declared</div><div><br></div><div>What is the correct namespace? </div><div><br></div><div>Look forward to your reply.</div></div><div><br></div><div>Pei Ren</div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div></div>