question...

question...

am 27.03.2003 03:20:22 von aihua_park2002

--0-1522214336-1048731622=:36468
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit


hello,
I'm a Chinese user of MySQL in linux, and I want to connect MySQL in C. I wrote a simple code to test it, and used the following command:
$gcc -I/usr/local/mysql/include connect1.c -L/usr/local/mysql -lmysqlclient -o connect
but then showed the following error:
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function 'my_compress_alloc':
my_compress.o(.text+0xb4):undefined reference to 'compress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function 'my_uncompress':
my_compress.o(.text+0x12a):undefined reference to 'uncompress'

I don't know why? How can I solve it? and what's my_compress.o and my_uncompress.o? Thank you!!!
By the way, I download the MySQL of mysql-standard-4.0.12-pc-linux-i686.tar.gz.




---------------------------------
Do You Yahoo!?
"ÑÅ»¢Í¨ÍøÂçKTV, ËæʱËæµØÃâ·Ñ¿¨À­OK~~"
--0-1522214336-1048731622=:36468--

Re: question...

am 27.03.2003 13:47:50 von Sinisa Milivojevic

=?gb2312?q?aihua=20park?= writes:
>
> hello,
> I'm a Chinese user of MySQL in linux, and I want to connect MySQL in C. I wrote a simple code to test it, and used the following command:
> $gcc -I/usr/local/mysql/include connect1.c -L/usr/local/mysql -lmysqlclient -o connect
> but then showed the following error:
> /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function 'my_compress_alloc':
> my_compress.o(.text+0xb4):undefined reference to 'compress'
> /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function 'my_uncompress':
> my_compress.o(.text+0x12a):undefined reference to 'uncompress'
>
> I don't know why? How can I solve it? and what's my_compress.o and my_uncompress.o? Thank you!!!
> By the way, I download the MySQL of mysql-standard-4.0.12-pc-linux-i686.tar.gz.
>

Hi!

Please do not use this list for the question like the above one.

This list is dedicated to bugs, with full repeatable test cases, and
not on the instructions on how to build your own programs.

But, all you have to do is link in zlib library.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com



--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: question...

am 27.03.2003 16:36:08 von Martin Gainty

Hello Aishua-
You have encountered 2 undefined entities
Grep thru all the code you have and find compress and uncompress function.
Hint:look at /mysys/mycompress.c for both my_compress and my_uncompress
functions..
recompile /mysys/mycompress.c and place the directory location of .o (object
output) in your path
If that doesnt work you will have to recompile the entire library-which
should only take a week or so-
Have fun!
-Martin
----- Original Message -----
From: "aihua park"
To:
Sent: Wednesday, March 26, 2003 7:20 PM
Subject: question...


>
> hello,
> I'm a Chinese user of MySQL in linux, and I want to connect MySQL in C. I
wrote a simple code to test it, and used the following command:
> $gcc -I/usr/local/mysql/include
onnect1.c -L/usr/local/mysql -lmysqlclient -o connect
> but then showed the following error:
> /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function
'my_compress_alloc':
> my_compress.o(.text+0xb4):undefined reference to 'compress'
> /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function
'my_uncompress':
> my_compress.o(.text+0x12a):undefined reference to 'uncompress'
>
> I don't know why? How can I solve it? and what's my_compress.o and
my_uncompress.o? Thank you!!!
> By the way, I download the MySQL of
mysql-standard-4.0.12-pc-linux-i686.tar.gz.
>
>
>
>
> ---------------------------------
> Do You Yahoo!?
> "ÑÅ»¢Í¨ÍøÂçKTV, ËæʱËæµØÃâ·Ñ¿¨À­OK~~"

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org