[ndnSIM] Linking error

chavoosh ghasemi chavoosh.ghasemi.off at gmail.com
Mon Jan 8 12:04:58 PST 2018


Thanks, Alex. It is fixed. It was a name convention problem.
BTW, I highly suggest that we add at least a note about name convention on
ndnSIM website. Currently, I can see nothing about it on the website or on
github.

*- Chavoosh*

On Mon, Jan 8, 2018 at 10:19 AM, Alex Afanasyev <aa at cs.fiu.edu> wrote:

> 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.
>
> -
> Alex
>
>
> On Jan 8, 2018, at 12:11 PM, chavoosh ghasemi <chavoosh.ghasemi.off at gmail.
> com> wrote:
>
> I see your point. However, what if we want to link this renamed file to
> the compilation units? How does it work?
>
> On Mon, Jan 8, 2018 at 6:22 AM, Alex Afanasyev <aa at cs.fiu.edu> wrote:
>
>> 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.
>>
>> My default recommendation is to use the scenario template that applies a
>> more user-friendly conventions described in README.
>>
>> --
>> Alex
>>
>> On Jan 3, 2018, at 11:26 AM, chavoosh ghasemi <
>> chavoosh.ghasemi.off at gmail.com> wrote:
>>
>> Yes, it is included ("
>> *ndn-load-balancer/random-load-balancer-strategy.hpp*"). To clarify the
>> problem, even if I just copy and paste *ndn-l**oad-balancer.cpp* example
>> 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.
>>
>> On Wed, Jan 3, 2018 at 8:17 AM, Spyridon (Spyros) Mastorakis <
>> mastorakis at cs.ucla.edu> wrote:
>>
>>> Hi,
>>>
>>> have you included the appropriate header file in your example?
>>>
>>> Thanks,
>>>
>>> Spyridon (Spyros) Mastorakis
>>> Personal Website: http://cs.ucla.edu/~mastorakis/
>>> Internet Research Laboratory
>>> Computer Science Department
>>> UCLA
>>>
>>> On Jan 2, 2018, at 11:46 PM, chavoosh ghasemi <
>>> chavoosh.ghasemi.off at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to use RandomLoadBalancer strategy in an example; however,
>>> apparently, there is a linking error. The example is located in the "
>>> *examples*" directory. Do I need to add the name of this example to any
>>> make/waf file?
>>>
>>> BTW, in continue, you can find the error after trying to run ./waf
>>> command.
>>>
>>>
>>> [3165/3179] Linking build/src/ndnSIM/examples/ns3-dev-icdn-simple-debug
>>>
>>> src/ndnSIM/examples/icdn-simple.cpp.1.o: In function `void
>>> ns3::ndn::StrategyChoiceHelper::Install<nfd::fw::RandomLoadB
>>> alancerStrategy>(ns3::Ptr<ns3::Node>, ndn::Name const&)':
>>> /home/vagrant/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-stra
>>> tegy-choice-helper.hpp:119: *undefined reference to
>>> `nfd::fw::RandomLoadBalancerStrategy::getStrategyName()*'
>>> /home/vagrant/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:120:
>>> undefined reference to `nfd::fw::RandomLoadBalancerSt
>>> rategy::getStrategyName()'
>>> /home/vagrant/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:123:
>>> undefined reference to `nfd::fw::RandomLoadBalancerSt
>>> rategy::getStrategyName()'
>>> src/ndnSIM/examples/icdn-simple.cpp.1.o: In function
>>> `std::unique_ptr<nfd::fw::RandomLoadBalancerStrategy,
>>> std::default_delete<nfd::fw::RandomLoadBalancerStrategy> >
>>> ndn::make_unique<nfd::fw::RandomLoadBalancerStrategy, nfd::Forwarder&,
>>> ndn::Name const&>(nfd::Forwarder&, ndn::Name const&)':
>>> /home/vagrant/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:75:
>>> undefined reference to `nfd::fw::RandomLoadBalancerSt
>>> rategy::RandomLoadBalancerStrategy(nfd::Forwarder&, ndn::Name const&)'
>>> collect2: error: ld returned 1 exit status
>>>
>>> Thanks,
>>> - *Chavoosh*
>>> --
>>> *Chavoosh Ghasemi*
>>>
>>>
>>>
>>
>>
>> --
>> *Chavoosh Ghasemi*
>>
>> Ph.D. Student in Computer Networking
>> University of Arizona - Computer Science Department
>> *Address: Gould-Simpson 721B, *
>> *1040 E. 4th Street,*
>>
>>
>> *                 Tucson, AZ 85721"The quieter you become, the more you
>> can hear"*
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>
>>
>> ______________
>> Alex Afanasyev
>> Assistant Professor, SCIS, Florida International University
>> 11200 SW 8th Street, ECS Room 261B, Miami, FL 33199
>> phone: +1.305.348.4960 <(305)%20348-4960> (office); email: aa at cs.fiu.edu
>> <aa at cs.fiu.edu>
>> web: https://users.cs.fiu.edu/~afanasyev/
>>
>>
>>
>
>
> --
> *Chavoosh Ghasemi*
>
> Ph.D. Student in Computer Networking
> University of Arizona - Computer Science Department
> *Address: Gould-Simpson 721B, *
> *1040 E. 4th Street,*
>
>
> *                 Tucson, AZ 85721"The quieter you become, the more you
> can hear"*
>
>
> ______________
> Alex Afanasyev
> Assistant Professor, SCIS, Florida International University
> 11200 SW 8th Street, ECS Room 261B, Miami, FL 33199
> phone: +1.305.348.4960 <(305)%20348-4960> (office); email: aa at cs.fiu.edu
> <aa at cs.fiu.edu>
> web: https://users.cs.fiu.edu/~afanasyev/
>
>
>


-- 
*Chavoosh Ghasemi*

Ph.D. Student in Computer Networking
University of Arizona - Computer Science Department
*Address: Gould-Simpson 721B, *
*1040 E. 4th Street,*


*                 Tucson, AZ 85721"The quieter you become, the more you can
hear"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180108/613dac02/attachment.html>


More information about the ndnSIM mailing list