List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:April 30 2002 1:58pm
Subject:Re: compilation problem
View as plain text  

kapil nakra wrote:

> I am facing problem in compiling c++ program using mysql libraries. I 
> am doing this for the first time. I would appreciate if anyone of you 
> help me out.
>
> thanks.
>
>
> folowing is the code
> ___________________________________
> #include <mysql.h>
> #include <assert.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>
> int main(void)
> {
>        MYSQL      mysql;
>        assert(mysql_init(&mysql) != NULL);
> }
>
> following is the command i am using to compling
> ________________________________________________________________
> #gcc connect.c -o mysql_capi.cgi -I/usr/include/mysql -L/usr/lib/mysql 
> -lmysqlclient -lm 


#gcc connect.c -o mysql_capi.cgi -I/usr/include/mysql -L/usr/lib/mysql 
-lmysqlclient -lm  -lz

Make sure you have zlib installed.

>
>
>
> following is the output i am getting
> ________________________________________________________________
>
> /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function 
> `my_uncompress':
> my_compress.o(.text+0xaa): undefined reference to `uncompress'
> /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function 
> `my_compress_alloc':
> my_compress.o(.text+0x13c): undefined reference to `compress'
> collect2: ld returned 1 exit status
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread107572@stripped>
> To unsubscribe, e-mail 
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread