2 messages in com.mysql.lists.plusplusRe: compilation problem
FromSent OnAttachments
kapil nakra30 Apr 2002 04:33 
Gerald Clark30 Apr 2002 06:57 
Subject:Re: compilation problem
From:Gerald Clark (gera@suppliersystems.com)
Date:04/30/2002 06:57:39 AM
List:com.mysql.lists.plusplus

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

To request this thread, e-mail <mysq@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-gerald_clark=supp@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php