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

Reply via email to