<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">If you're using conventions in the examples/ folder, then you need to create a new folder that matches name of the scenario and copy .cpp/.hpp files that need to be linked there.<div class=""><br class=""></div><div class="">-</div><div class="">Alex<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 8, 2018, at 12:11 PM, chavoosh ghasemi <<a href="mailto:chavoosh.ghasemi.off@gmail.com" class="">chavoosh.ghasemi.off@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I see your point. However, what if we want to link this renamed file to the compilation units? How does it work?<div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jan 8, 2018 at 6:22 AM, Alex Afanasyev <span dir="ltr" class=""><<a href="mailto:aa@cs.fiu.edu" target="_blank" class="">aa@cs.fiu.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">You cannot just rename the scenario, as there is a naming convention of how scenarios are compiled.  Normally, the scenario.cpp file is linked together with ndnSIM and rest of NS-3 and nothing else.  In this case, the scenario is also linked to all compilation units under <scenario>/ folder.  Therefore, if you rename just scenario.cpp, it is no longer linked to other required files and you have errors.<div class=""><br class=""></div><div class="">My default recommendation is to use the scenario template that applies a more user-friendly conventions described in README.</div><div class=""><br class=""></div><div class="">--</div><div class="">Alex<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="m_-5575615250298952965h5"><div class="">On Jan 3, 2018, at 11:26 AM, chavoosh ghasemi <<a href="mailto:chavoosh.ghasemi.off@gmail.com" target="_blank" class="">chavoosh.ghasemi.off@gmail.co<wbr class="">m</a>> wrote:</div><br class="m_-5575615250298952965m_-1833803266234498519Apple-interchange-newline"></div></div><div class=""><div class=""><div class="m_-5575615250298952965h5"><div dir="ltr" style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">Yes, it is included ("<i class=""><b class="">ndn-load-balancer/random-loa<wbr class="">d-balancer-strategy.hpp</b></i>"). To clarify the problem, even if I just copy and paste<span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span><b class=""><i class="">ndn-l</i></b><i style="font-weight:bold" class="">oad-balancer.cpp</i> ex<wbr class="">ample and rename it, it won't work. Something is wrong with linking part and I guess maybe I need to add the name of new examples to waf/makefile. If you can, please test it on your own machine and let me know if you had any problem.</div><div class="gmail_extra" style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class=""><div class="gmail_quote">On Wed, Jan 3, 2018 at 8:17 AM, Spyridon (Spyros) Mastorakis<span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank" class="">mastorakis@cs.ucla<wbr class="">.edu</a>></span><span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">Hi,<div class=""><br class=""></div><div class="">have you included the appropriate header file in your example?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class=""><div class=""><div class=""><div class=""><span style="float:none;display:inline!important" class="">Spyridon (Spyros) Mastorakis</span><br class=""><span style="float:none;display:inline!important" class="">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank" class="">http://cs.ucla.edu/~m<wbr class="">astorakis/</a><br class=""><span style="float:none;display:inline!important" class="">Internet Research Laboratory</span><br class=""><span style="float:none;display:inline!important" class="">Computer Science Department</span><br class=""><span style="float:none;display:inline!important" class="">UCLA</span></div><div class=""><br class=""></div></div></div></div><span class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 2, 2018, at 11:46 PM, chavoosh ghasemi <<a href="mailto:chavoosh.ghasemi.off@gmail.com" target="_blank" class="">chavoosh.ghasemi.off@gmail.co<wbr class="">m</a>> wrote:</div><br class="m_-5575615250298952965m_-1833803266234498519m_-4757775674403717134Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">I'm trying to use RandomLoadBalancer strategy in an example; however, apparently, there is a linking error. The example is located in the "<i style="font-weight:bold" class="">examples</i>"<i style="font-weight:bold" class=""> </i>directory. Do I need to add the name of this example to any make/waf file? </div><div class=""><br class=""></div><div class="">BTW, in continue, you can find the error after trying to run ./waf command.</div><div class=""><br class=""></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><font size="1" class="">[3165/3179] Linking build/src/ndnSIM/examples/ns3-<wbr class="">dev-icdn-simple-debug</font></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><font size="1" class="">src/ndnSIM/examples/icdn-simpl<wbr class="">e.cpp.1.o: In function `void ns3::ndn::StrategyChoiceHelper<wbr class="">::Install<nfd::fw::RandomLoadB<wbr class="">alancerStrategy>(ns3::Ptr<ns3:<wbr class="">:Node>, ndn::Name const&)':</font></div><div class=""><font size="1" class="">/home/vagrant/ndnSIM/ns-3/buil<wbr class="">d/./ns3/ndnSIM/helper/ndn-stra<wbr class="">tegy-choice-helper.hpp:119:<span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span><b class="">un<wbr class="">defined reference to `nfd::fw::RandomLoadBalancerSt<wbr class="">rategy::getStrategyName()</b>'</font></div><div class=""><font size="1" class="">/home/vagrant/ndnSIM/ns-3/buil<wbr class="">d/./ns3/ndnSIM/helper/ndn-stra<wbr class="">tegy-choice-helper.hpp:120: undefined reference to `nfd::fw::RandomLoadBalancerSt<wbr class="">rategy::getStrategyName()'</font></div><div class=""><font size="1" class="">/home/vagrant/ndnSIM/ns-3/buil<wbr class="">d/./ns3/ndnSIM/helper/ndn-stra<wbr class="">tegy-choice-helper.hpp:123: undefined reference to `nfd::fw::RandomLoadBalancerSt<wbr class="">rategy::getStrategyName()'</font></div><div class=""><font size="1" class="">src/ndnSIM/examples/icdn-simpl<wbr class="">e.cpp.1.o: In function `std::unique_ptr<nfd::fw::Rand<wbr class="">omLoadBalancerStrategy, std::default_delete<nfd::fw::R<wbr class="">andomLoadBalancerStrategy> > ndn::make_unique<nfd::fw::Rand<wbr class="">omLoadBalancerStrategy, nfd::Forwarder&, ndn::Name const&>(nfd::Forwarder&, ndn::Name const&)':</font></div><div class=""><font size="1" class="">/home/vagrant/ndnSIM/ns-3/buil<wbr class="">d/ns3/ndnSIM/ndn-cxx/util/back<wbr class="">ports.hpp:75: undefined reference to `nfd::fw::RandomLoadBalancerSt<wbr class="">rategy::RandomLoadBalancerStra<wbr class="">tegy(nfd::Forwarder&, ndn::Name const&)'</font></div><div class=""><font size="1" class="">collect2: error: ld returned 1 exit status</font></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">-<span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span><i class="">Chavoosh</i></div>--<span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span><br class=""><div class="m_-5575615250298952965m_-1833803266234498519m_-4757775674403717134gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span class=""><font color="#888888" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" style="color:rgb(34,34,34)" class=""><font color="#888888" class=""><span style="color:rgb(0,0,153);font-family:georgia,serif" class=""><i class=""><b class="">Chavoosh Ghasemi</b></i><br class=""></span></font></div></div></div></div></div></font></span></div></div></div></div></div></div></blockquote></div><br class=""></span></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="m_-5575615250298952965m_-1833803266234498519Apple-converted-space"> </span><br class=""><div class="m_-5575615250298952965m_-1833803266234498519gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span class=""><font color="#888888" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" style="color:rgb(34,34,34)" class=""><font color="#888888" class=""><span style="color:rgb(0,0,153);font-family:georgia,serif" class=""><i class=""><b class="">Chavoosh Ghasemi</b></i><br class=""><span style="color:rgb(153,153,0)" class=""><br class=""><span style="color:rgb(153,0,0)" class="">Ph.D. Student in Computer Networking</span></span></span></font><span style="color:rgb(153,0,0)" class=""><span style="font-family:georgia,serif" class=""> </span><span style="font-family:georgia,serif" class=""><br class="">University of Arizona - Computer Science Department</span><font size="1" class=""><b class=""><i class=""><br class=""></i></b></font></span></div><div style="color:rgb(34,34,34)" class=""><span style="color:rgb(204,0,0)" class=""><font size="1" class=""><b class=""><i class="">Address: Gould-Simpson 721B, </i></b></font><font size="1" class=""><b class=""><i class="">1040 E. 4th Street,<br class=""></i></b></font></span></div><div dir="ltr" style="color:rgb(34,34,34)" class=""><span style="color:rgb(153,0,0)" class=""><font size="1" class=""><b class=""><i class=""><span style="color:rgb(204,0,0)" class="">                 Tucson, AZ 85721</span><br class=""><br class="">"The <i class="">quieter</i> you become, the <i class="">more you can hear"</i></i></b></font></span></div></div></div></div></div></font></span></div></div></div></div></div></div></div><span style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">______________________________<wbr class="">_________________</span><br style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">ndnSIM mailing list</span><br style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">ndnSIM@lists.cs.ucla.edu</a><br style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" style="font-family:Georgia;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">http://www.lists.cs.ucla.edu/m<wbr class="">ailman/listinfo/ndnsim</a></div></blockquote></div><br class=""><div class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word; line-break: after-white-space;" class="">______________<span class="m_-5575615250298952965HOEnZb"><font color="#888888" class=""><br class="">Alex Afanasyev<br class="">Assistant Professor, SCIS, Florida International University<br class="">11200 SW 8th Street, ECS Room 261B, Miami, FL 33199<br class="">phone: <a href="tel:(305)%20348-4960" value="+13053484960" target="_blank" class="">+1.305.348.4960</a> (office); <a href="mailto:aa@cs.fiu.edu" target="_blank" class="">email: aa@cs.fiu.edu</a><br class="">web: <a href="https://users.cs.fiu.edu/~afanasyev/" target="_blank" class="">https://users.cs.fiu.edu/~afan<wbr class="">asyev/</a><br class=""><br class=""></font></span></div></div></div>
</div>
<br class=""></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="m_-5575615250298952965gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span class=""><font color="#888888" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" style="color:rgb(34,34,34)" class=""><font color="#888888" class=""><span style="color:rgb(0,0,153);font-family:georgia,serif" class=""><i style="" class=""><b class="">Chavoosh Ghasemi</b></i><br class=""><span style="color:rgb(153,153,0)" class=""><br class=""><span style="color:rgb(153,0,0)" class="">Ph.D. Student in Computer Networking</span></span></span></font><span style="color:rgb(153,0,0)" class=""><span style="font-family:georgia,serif" class=""> </span><span style="font-family:georgia,serif" class=""><br class="">University of Arizona - Computer Science Department</span><font size="1" class=""><b class=""><i class=""><br class=""></i></b></font></span></div><div style="color:rgb(34,34,34)" class=""><span style="color:rgb(204,0,0)" class=""><font size="1" class=""><b class=""><i class="">Address: Gould-Simpson 721B, </i></b></font><font size="1" class=""><b class=""><i class="">1040 E. 4th Street,<br class=""></i></b></font></span></div><div dir="ltr" style="color:rgb(34,34,34)" class=""><span style="color:rgb(153,0,0)" class=""><font size="1" class=""><b class=""><i class=""><span style="color:rgb(204,0,0)" class="">                 Tucson, AZ 85721</span><br class=""><br class="">"The <i class="">quieter</i> you become, the <i class="">more you can hear"</i></i></b></font></span></div></div></div></div></div> </font></span>
</div></div></div></div>
</div></div>
</div></blockquote></div><br class=""><div class="">
<div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">______________<br class="">Alex Afanasyev<br class="">Assistant Professor, SCIS, Florida International University<br class="">11200 SW 8th Street, ECS Room 261B, Miami, FL 33199<br class="">phone: +1.305.348.4960 (office); <a href="mailto:aa@cs.fiu.edu" class="">email: aa@cs.fiu.edu</a><br class="">web: <a href="https://users.cs.fiu.edu/~afanasyev/" class="">https://users.cs.fiu.edu/~afanasyev/</a><br class=""><br class=""></div></div></div>
</div>
<br class=""></div></body></html>