Doubt in connecting to mysql database from plugin

Jlnarayanan00 at aol.com Jlnarayanan00 at aol.com
Thu Jan 6 14:53:57 CET 2005


  
Hi ,
 
    I had raised a doubt regarding connecting to mysql database from the 
plugin.As per the solution that was suggested yesterday I have included the path 
where the libmysqlclient.so.* file is present in the /etc/ld.so.conf. file.
 
If  I give a command “locate libmysqlclient” in my system ,I am getting the 
following output.
 
[]$ locate libmysqlclient
/usr/lib/mysql/libmysqlclient.la
/usr/lib/mysql/libmysqlclient_r.la
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/libmysqlclient.so
/usr/lib/libmysqlclient.so.10.0.0
/usr/lib/libmysqlclient.so.10
/usr/lib/libmysqlclient.so.14.0.0
/usr/lib/libmysqlclient.so.14
/usr/lib/libmysqlclient_r.so.10
/usr/lib/libmysqlclient_r.so
/usr/lib/libmysqlclient_r.so.10.0.0
/usr/lib/libmysqlclient_r.so.14
/usr/lib/libmysqlclient_r.so.14.0.0
 
So after adding the path in the /etc/ld.so.conf file 
 
[root at localhost etc]# cat ld.so.conf
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/sane
/usr/lib/qt-3.1/lib
/usr/lib/mysql
 
 
While giving “make all” command for the plugins I am getting the following 
error still
 
undefined reference to `mysql_init'
undefined reference to `mysql_real_connect' …….
 
But while trying to compiling the plugin from the command prompt by giving 
the following command ,
gcc -o check_dummy1 check_dummy1.c -I/usr/include/mysql -L/usr/lib/mysql 
-lmysqlclient -lz -fno-exceptions
 {check_dummy1 is the plugin in which i have coded to connect to the mysql 
database}

I am not getting the error as undefined reference to “mysql_init” and other 
mysql related functions.{But the error I am getting is undefined reference for 
the functions that are common to all plugins like “undefined reference to 
`print_revision'” which I understand should come.}
 
Now where should I make changes for linking with the mysql client library 
which is the problem as far i understand.
Can anybody please help me out in this issue??
 
Regards,
Jaya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050106/4921971f/attachment.html>


More information about the Users mailing list