List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:June 9 1999 5:47pm
Subject:Re: mysql_real_connect problem??
View as plain text  
>>>>> "April" == April Escamilla <aprile@stripped> writes:

April> Paul,
April> Thanks very much for your quick responses and suggestions.  I went ahead
April> and tried the combination you suggested -- I deleted the db argument, and
April> tried to compile by specifying -lmysqlclient instead of -lmysql.  Here's
April> what I got back

April> #  cc -o mysql_connect mysql_connect.c -lc -lmysqlclient
April> undefined                       first referenced
April> symbol                             in file
April> mysql_init                          mysql_connect.o
April> mysql_real_connect                  mysql_connect.o
April> i386ld fatal: Symbol referencing errors. No output written to mysql_connect


April> #cc -o mysql_connect mysqlconnect.c -lc -L/u/april/mysql -lmysqlclient
April> <
April> undefined                       first referenced
April> symbol                             in file
April> mysql_init                          mysql_connect.o
April> mysql_real_connect                  mysql_connect.o
April> i386ld fatal: Symbol referencing errors. No output written to mysql_connect


April> Any thoughts on this, Paul, or anyone else?

Hi!

MySQL 3.21.x doesn't have the mysql_init call, so you can just remove
from your code as follows:

#if MYSQL_VERSION_ID >= 32200
  mysql_init(&mysql);
#endif

You should however have the mysql_real_connect() in 3.21.33. Are you
sure you are linking with the correct library?

You can check that you have the real_connect_call by doing.

nm libmysqlclient.a | grep mysql_real

If this doesn't print anything, you should use the mysql_connect()
call instead!

Regards,
Monty



Thread
mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Paul DuBois9 Jun
Re: mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Paul DuBois9 Jun
Re: mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Paul DuBois9 Jun
  • Re: mysql_real_connect problem??Michael Widenius9 Jun
Re: mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Paul DuBois9 Jun
Re: mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Paul DuBois9 Jun
Re: mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Sasha Pachev9 Jun
Re: mysql_real_connect problem??April Escamilla9 Jun
  • Re: mysql_real_connect problem??Paul DuBois10 Jun
  • Re: mysql_real_connect problem??Sasha Pachev10 Jun
Re: mysql_real_connect problem??April Escamilla10 Jun
  • Re: mysql_real_connect problem??Sasha Pachev10 Jun
Re: mysql_real_connect problem??April Escamilla10 Jun
Re: mysql_real_connect problem??April Escamilla10 Jun
Re: mysql_real_connect problem??April Escamilla10 Jun
  • Re: mysql_real_connect problem??Sasha Pachev10 Jun
Re: mysql_real_connect problem??April Escamilla10 Jun
  • Re: mysql_real_connect problem??Paul DuBois10 Jun
  • Re: mysql_real_connect problem??Sasha Pachev10 Jun
Re: mysql_real_connect problem??April Escamilla11 Jun
  • Re: mysql_real_connect problem??Sasha Pachev11 Jun