Laurent Oget writes:
 > I am not sure this will solve your probleme but you need to add -lnsl and -lsocket 
 >to the compile command line.
 > 
 > On Thu, Mar 01, 2001 at 11:03:11PM +0800, john1 wrote:
 > > 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
 > > 
 > 
 > -- 
 > Laurent Oget, Ph.D.  [EMAIL PROTECTED]
 > Senior Engineer              Zvolve Systems Inc      http://zvolve.com
 > Chercheur Associé    Liafa                   http://liafa.jussieu.fr
 > 


No, the above means he has to update his glibc.


Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaca, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

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