I get the same thing compiling a C program using the MySQL libraries. I posted the following to the forum at devshed.com but no-one has an answer:
I've viewed some past posts on compilation, yet I still encounter an error when I try to link the libraries. (BTW the code I'm trying to compile is the insert_test.c from the client directory of the source distribution). I do the following:
gcc -c -I/usr/local/mysql/include insert_test.c
(This works fine)
gcc -o insert_test insert_test.o -L/usr/local/mysql/lib -lmysqlclient -lm -lxnet -lmysys -lmystrings -lnsl -lsocket
(I try all the libraries just to be certain I haven't missed anything [I've also tried them independently, upside down etc] yet I still get this):
Undefined first referenced
symbol in file
uncompress /usr/local/mysql/lib/libmysqlclient.a(my_compress.o)
compress /usr/local/mysql/lib/libmysqlclient.a(my_compress.o)
I'm using solaris 2.8 on a Sparc if that helps.
Thanks for any help
theKid