Menu

#1 Compile breaks without -lz lib flag

open
nobody
None
5
2001-10-25
2001-10-25
No

When trying to compile on my linux system it broke when
linking to libmysqlclient.a.

Exact error:
gcc -g -O2 -Wall -s -L. -L/usr/local/mysql/lib -o
dbf2mysql dbf2mysql.o -ldbf \ -lmysqlclient -lm
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o):
In function `my_uncompress':
my_compress.o(.text+0x9a): undefined reference to
`uncompress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o):
In function `my_compress_alloc':
my_compress.o(.text+0x12a): undefined reference to
`compress'
collect2: ld returned 1 exit status

Adding '-lz' to the Makefile define of EXTRALIBS fixed
this and the compile was complete.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.