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 <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php