Hi,

Check for open64 in the archives for the last month, and you will find your
answer (which is to upgrade your gcc).

Regards

Quentin

-----Original Message-----
From: john1 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 6 March 2001 4:47 a.m.
To: [EMAIL PROTECTED]
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 program which catched from the MySQL tutorial, it
chokes at the end of compile process . the program 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

The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended 
recipient, you are asked to respect that confidentiality and not 
disclose, copy or make use of its contents. If received in error 
you are asked to destroy this email and contact the sender immediately. 
Your assistance is appreciated.

---------------------------------------------------------------------
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

Reply via email to