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
