Hi John,
I had faced a similar problem earlier, I solved it my instaling MySQL-devel package
and include the libmyclient library stored in /usr/lib (not in /usr/lib/mysql/)in the
compile command.
Best of Luck,
Shambhu.
------------- Original Message --------------
john1 <[EMAIL PROTECTED]> wrote:
To:[EMAIL PROTECTED]
From:john1 <[EMAIL PROTECTED]>
Date:Thu, 1 Mar 2001 23:03:11 +0800
Subject:C API problem
dear Sir :
MySQL 3.22 on my linux 486 PC seems work so good. when I compile
a simple C API programe which catched from the MySQL tutorial, it
chokes at the end of compile process . the programe is as follows:
#include <stdio.h>
#include <mysql.h>
#define def_host_name NULL
#define def_user_name NULL
#define def_password NULL
#define def_db_name NULL
MYSQL *conn;
int main(int argc,char *argv[])
{
conn=mysql_init(NULL);
mysql_real_connect(
conn,
def_host_name,
def_user_name,
def_password,
def_db_name,
0, /*port defaut*/
NULL, /*socket default*/
0); /*flag*/
mysql_close(conn);
exit(0);
}
I compile as follows:
gcc -o client my_simplest_prog -I/home/MySQL/MySQL/include \
-L/home/MySQL/MySQL/lib \
-lmysqlclient
then I get :
/home/MySQL/MySQL/lib/libmysqlclient.a(my_open.o)In function 'my_open':
my_open.o(.text+0x14):undefined reference to 'open64'
/home/MySQL/MySQL/lib/libmysqlclient.a(mf_format.o)In function 'fn_format':
mf_format.o(.text+0x201):undefined reference to '__lxstat64'
/home/MySQL/MySQL/lib/libmysqlclient.a(my_open.o)In function 'my_open':
my_open.o(.text+0x21):undefined reference to 'fopen64'
nothing left to do with the situation, I beg your help. anyway I'm a
newcomer. thank you very much.
please send message to [EMAIL PROTECTED]
---------------------------------------------------------------------
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
_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.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