open_serial_source() -- and probably some other necessary
functions -- must be defined somewhere in the example C programs,
or perhaps in a library they use. You need to include these
functions with your new code, either brute force copy the
source into your test.c file, or link with .o or .a (library)
files generated from the original.
Usually you'd make test.o by itself and then do a link like:
gcc test.o someother.o -o test.out
but I don't know the specific options to use...hopefully some
gcc doc someplace will describe how to do this...
MS
[EMAIL PROTECTED] wrote:
Hello,
I'm trying to write a simple serial listener application in C, using
the tools provided in /support/sdk/c. I've successfully compiled the
tools and run the example "seriallistener" program. However, I'm
having trouble getting my own programs to compile. I have a simple
test program (test.c) that contains a call to open_serial_source. When
I try to compile it with
gcc -L/opt/tinyos-2.x/support/sdk/c -lmote -o test.out test.c
I get the following error:
/cygdrive/c/DOCUME~1/student/LOCALS~1/Temp/ccCRG2eq.o:test.c:
(.text+0x7a): undefined reference to `_open_serial_source'
collect2: ld returned 1 exit status
I'm sure it's a problem with the way I'm invoking gcc, but I haven't
been able to figure it out. Can anyone give me pointers? (I don't
have much gcc experience, so please spell things out :)
Thanks,
Kriangsiri
_______________________________________________
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