Thank you for the replies. For future reference, I was able to get it to work with the following (again, assuming the source file is test.c):
gcc -c test.c -o test.o gcc -g -O2 -o test.out test.o libmote.a ----- Original Message ----- From: "Oussama Chougna" <[EMAIL PROTECTED]> Date: Tuesday, May 15, 2007 10:02 am Subject: RE: [Tinyos-help] Serial communication with C SDK > Hi steve, > > > You have to give an extra argument to your compiler. > I had exactly the same problem in the past. > > Try the -g option: > > Gcc -g yourapp.c <your_SDK_path>serialsource.c ..... > > > Try it and let me know if that fixes your problem. (It should) > > > O.Chougna > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > SteveMcKown > Sent: dinsdag 15 mei 2007 16:45 > To: [email protected] > Subject: Re: [Tinyos-help] Serial communication with C SDK > > Hi, > > On Monday 14 May 2007 13:39, [EMAIL PROTECTED] wrote: > > 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 > > It looks like you may be calling _open_serial_source() in test.c > when the > function name has no leading underscore. > > Steve > _______________________________________________ > 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 > _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
