Actually, this error is generated when a function is called BEFORE its defined/declared (remember that nesC is C-based not C++).

Just put the function declaration/definition at the start in the implementation body in nesC file or just above the function in which you are going to call it.

On 9/18/06, 
Sumit Gupta singhals.sumit at gmail.com wrote:
Well, all qsort() function doing here in MultiHopLEPSM.nc is sorting an
array of struct SortEntry in assending order on the basis of receiveEst. So
after studying all about this function I figure out that we can simply
replace with nested for loop which can do the same. You can comment out
qsort() and replace with following code:

uint8_t k;
struct SortEntry tempEntry;

for(i=0; i<j; i++)
{
for(k=0;k<j;k++)
{
if(sortTbl[i].receiveEst > sortTbl[k].receiveEst)
{
tempEntry.id = sortTbl[i].id;
tempEntry.receiveEst = sortTbl[i].receiveEst;
sortTbl[i].id = sortTbl[k].id;
sortTbl[i].receiveEst = sortTbl[k].receiveEst;
sortTbl[k].id = tempEntry.id;
sortTbl[k].receiveEst = tempEntry.receiveEst;
}
}
}

I hope it helped.

Good Luck.
Sumit

On 9/18/06, Dachiraju Raju <dandydude83 at yahoo.com> wrote:
>
> hi,
>
> i was wondering how you solved the problem on the function qsort .? i also
> have same error as you when trying to compile for telos. so i commented tht
> line.. i was hoping you could tell me a solution for the error.
>
> Implicit declaration of function qsort.
>
> thanks a lot!
>
> ------------------------------
> How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
> rates.
> <http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com>
>
>



_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to