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 identifierexists or not, then I run this program with gcc
command in cygwin linking libmysql.dll library:
gcc test.c -lmysql
$ make telosb
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.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:
/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
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help