[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: MySQL C APIs- solution

> > Hi friends,
> >
> > using the following command line parameters.
> >
> > $cc -L/usr/lib/mysql myapp.c -o myapp -lm  -lmysqlclient
> >
> > The error message that I get is:
> > /usr/lib/mysql/libmysqlclient.a(my_compress.o): In  function

OK sunil ! the MySQL help says..
Add -lgz as the last link option.

But if u do that it'll say, cant find -lgz ! Aaargh !!

the -libgz comes only in Suse.
u'll have to stick with the libz in other linux boxes.

So instead u add -lz as the last linker option.
and ur complie line now is ...

$cc -L/usr/lib/mysql myapp.c -o myapp -lm  -lmysqlclient  -lz

this worked on my puter. tell me ur story ?

and since we are almost the same pace in Mysql/C. we r likely to face
similar probs. Plz keep posting ur problems, we might be able to help each
other. :o)

cya !