List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:January 26 2003 7:44am
Subject:Re: error with 4.0.9 "c" API or user
View as plain text  
In the last episode (Jan 25), sam said:
> I am getting the following message when submitting the following:
>     [sam@linux sam]$ make
>     gcc -o listener main.o common.o -L/usr/lib/mysql -lmysqlclient -lm
>     /usr/lib/mysql/libmysqlclient.a(my_compress.o):
>     In function `my_uncompress': my_compress.o(.text+0xaa):undefined reference to
> `uncompress'
>     /usr/lib/mysql/libmysqlclient.a(my_compress.o):
>     In function `my_compress_alloc': my_compress.o(.text+0x13c): undefined reference
> to `compress'
>     collect2: ld returned 1 exit status make: *** [listener] Error 1

Add -lz to your link line after -lmysqlclient.  Your system is
apparently one where libraries cannot tell the linker what other
libraries they depend on, so you have to do it yourself.

	Dan Nelson