Jay, don't bother with the .c file, just put the declaration and
definition all in the header. This works because nesC just compiles
to one big app.c, so you don't get duplicate references.
Cory
On 7/10/06, Jay Taneja <[EMAIL PROTECTED]> wrote:
Hello,
I am attempting to include a subroutine written in C. I've seen a couple
posts on this list about this, but I would like to include the subroutine
without writing a nesC wrapper. Currently I am simply following the way C
includes files:
mysub.h:
#ifndef MYSUB_H
#define MYSUB_H
int mysub(int param);
#endif
mysub.c:
#include "mysub.h"
int mysub(int param) {
return param + 1;
}
ModuleM.nc
#include " mysub.h"
...
implementation {
...
some_number_2 = mysub(some_number);
...
}
However, when I compile, I get an "undefined reference to `mysub'" - any
idea of a clean way to fix this?
Thanks.
-jay
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help