Good to know.  Thanks.

Regards
KK

On 13 January 2011 15:48, Ricardo Bennesby <[email protected]> wrote:
> Hi KK.
> You are right, that line was causing the error, cause it was already defined
> as you said. Now it is working.
> Thanks a lot.
>
> 2011/1/13 kk yap <[email protected]>
>>
>> Hi Ricardo,
>>
>> Why was this needed?
>>
>>    Timer post(const Timer_Callback&, const timeval& duration) const;
>>
>> If you look at http://noxrepo.org/manual/app.html#posting-timers, this
>> is already defined.  Would the example code posted work?
>>
>> Regards
>> KK
>>
>> On 13 January 2011 15:30, Ricardo Bennesby <[email protected]>
>> wrote:
>> > Hi, I am writing a component in C++ that uses a timer.
>> >
>> > In the .hh file I put:
>> >     Timer post(const Timer_Callback&, const timeval& duration) const;
>> >     Disposition handle_datapath_join(const Event& e);
>> >
>> > And in the .cc file there is a post that calls a timer method:
>> >   #include "timeval.hh"
>> >   #include "timer-dispatcher.hh"
>> >   Disposition newcomp::handle_datapath_join(const Event& e) {
>> >         timeval tv={1,0};
>> >         post(boost::bind(&newcomp::timer,this), tv);
>> >         return CONTINUE;
>> >   }
>> >
>> > And the timer method:
>> >  void newcomp::timer() {
>> >       lg.dbg("One second has passed...\n");
>> >   }
>> >
>> > It compiles normally but when I tried to execute it, I got the following
>> > message:
>> > 00043|nox|ERR:Cannot change the state of 'newcomp' to INSTALLED:
>> > 'newcomp' ran into an error:
>> >     Can't open a dynamic library: 'nox/netapps/newcomp/newcomp.so:
>> > cannot
>> > open shared object file: No such file or directory' or
>> > 'nox/netapps/newcomp/.libs/newcomp.so: undefined symbol:
>> > vigil::applications::newcomp::post(boost::function<void ()()> const&,
>> > timeval const&) const'
>> >
>> > Any suggestions to solve this problems?
>> > Best Regards.
>> >
>> > --
>> > Ricardo Bennesby da Silva
>> > Ciência da Computação - UFAM
>> > LabCIA - Laboratório de Computação Inteligente e Autônoma
>> >
>> >
>> > _______________________________________________
>> > nox-dev mailing list
>> > [email protected]
>> > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>> >
>> >
>
>
>
> --
> Ricardo Bennesby da Silva
> Ciência da Computação - UFAM
> LabCIA - Laboratório de Computação Inteligente e Autonômica
>
>

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to