Dear Sir :

MySQL 3.22.32 on my linux 486 PC seems work so good. When I compile 
a simple C API program which catched from 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 my_code my_code.c -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

Reply via email to