In MySQL-devel-3.23.12c-1 rpm , the c source test.c was compiled well
but in MySQL-devel-3.23.15-1 rpm , when compileing same source I met error message
as follows;
======================================================================
[root@cboss cboss]# gcc -g -o test test.c -L/usr/lib/mysql -lmysqlclient
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0x97): undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x12b): undefined reference to `compress'
collect2: ld returned 1 exit status
============================================================
위와 같은 질문에 Tim의 답변 내용이 You need to add -lz to your command line when you link. 입니다.
그래서
[root@cboss cboss]# gcc -g -o test test.c -L/usr/lib/mysql -lmysqlclient -lz
했더니
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
라는 메세지로 끝나는 군요..
Tim이 뭘 하라는 건지 좀 알려주시곘습니까?
그럼 즐통
|