Thank you for your reply
I want to know whyMSP430-gcc compiler of telosb platforms in my case,
does
not compile .dll formatlibrary, while gcc and g++ have made the linkage with
this library when I tested my code with tossim.
After several tests, I notice that MSP430-ldonly accepts .a library
(static libraries for unix) butMSP430-gcc does not link them to the nesc code.
As regardswhatI want todo:
I want to achieve a system of authentication of motes in a WSN for that I
assumes:
1- node (1) which sends its identifier via radio communication to a node (2)
containing the program BaseStation
2- This node (2) is connected via USB to a PC containing mysql server
3- as soon as the node (2) receives the identifier, it connects to the mysql
database to see if such a key exists or not in the database
4- node (2) returns the authentication result to the node (1)
please help me if there is something not logical.
________________________________
De : Michael Schippling <[email protected]>
À : amira Mnif <[email protected]>
Cc : [email protected]
Envoyé le : Jeu 14 avril 2011, 20h 15min 27s
Objet : Re: [Tinyos-help] link with mysql library
I gather you are trying to link mysql into a TOS program?
Most likely libmysql.dll is being ignored because it is
not in a format acceptable to the telosb linker.
But on a larger scale: How do you propose for the TOS code
to communicate with the database? TOS is running on the
"other end" of a USB connection and can't open ethernet
ports to host level processes. What you probably want to
do is write a host level program which links the the base-
station over USB to mysql.
MS
amira Mnif wrote:
> Hello,
> I work with TinyOS-2.x installed under cygwin, and I have a mysql server
>installed into Windows 7.
> I want to make a connection to a database created in MySQL from a component
>nesc, actually I want the application BaseStation connects to the mysql
>database
>to verify that an identifier of a node exists or not.
> For this I have already written a C program that makes the database
> connection
>and verify that such identifier exists or not, then I run this program with
>*gcc* command in cygwin linking libmysql.dll library:
>
> */gcc test.c -lmysql/*
> */ /*
> */
> /*it works without error but when I copy the code of *test.c* into
>BaseStationP.nc and after adding this line in the makefile of BaseStation
> */CFLAGS + = -L/usr/local/lib-shared-lmysql /*: to make the linkage with
>libmysql.dll
> that produced the following errors:
> $ make telosb
>
> /cygdrive/c/Users/Amira/AppData/Local/Temp/ccUTU6G6.o: In function
>`BaseStationP
> $test':
> app.c:(.text+0x3b4c): undefined reference to `mysql_init'
> app.c:(.text+0x3b92): undefined reference to `mysql_real_connect'
> app.c:(.text+0x3ba2): undefined reference to `mysql_error'
> app.c:(.text+0x3bac): undefined reference to `mysql_errno'
> app.c:(.text+0x3bbe): undefined reference to `mysql_close'
> app.c:(.text+0x3bd6): undefined reference to `mysql_query'
> app.c:(.text+0x3be2): undefined reference to `mysql_error'
> app.c:(.text+0x3bf0): undefined reference to `mysql_use_result'
> app.c:(.text+0x3bfc): undefined reference to `mysql_fetch_row'
> app.c:(.text+0x3c32): undefined reference to `mysql_free_result'
> app.c:(.text+0x3c3a): undefined reference to `mysql_close'
> make: *** [exe0] Error 1
> I know that these errors are the result of the non-linkage with libmysql.dll
> how to make a linkage with a library in nesc?
> Please help me.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help