LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-14-2001, 07:59 AM   #1
[RJP]DeanLO
LQ Newbie
 
Registered: Nov 2001
Posts: 1

Rep: Reputation: 0
Question mySQL and C API Problems


I am having a problem with mySQL and the C API. I took the example from the mySQL documentation and compiled it. I followed the directions that the docs gave me.

example...
gcc myfile.c -L/usr/lib/mysql -lmysqlclient

I got errors that there is undefined references to my_compress(). The docs say to place a -lz in the gcc line to correct the problem.

gcc myfile.c -L/usr/lib/mysql -lmysqlclient -lz

Problem here is that my linux distro doesn't know what -lz is. What library is libz? I do not have it on my Linux box. I am running Mandrake 8.0 with mySQL that came on the CD (probably not 4.0)

Please help me ... this is driving me crazy!


Thanks!
 
Old 11-15-2001, 09:16 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Download, build and install zlib.

http://www.gzip.org/zlib/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Client API I_AM Linux - Newbie 1 06-27-2005 02:52 AM
mysql client api I_AM Linux - Newbie 1 06-23-2005 11:48 PM
linking C api for mysql toships Programming 3 04-08-2004 11:29 PM
msql++ c++ api for mysql nakkaya Linux - Software 0 04-19-2003 03:56 PM
c++ and mysql api nakkaya Programming 4 03-28-2003 11:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration