On Fri, Jun 22, 2001 at 04:54:17PM +0800, eagle wrote:
> mysql
> hello all.
> I install mysql 3.23.32 on red hat 6.0 .
> I have a c program source as bellow:
> //*****************************************
> gcc -I /usr/local/include/mysql mysql_test.c -L /usr/local/lib/mysql -lmysqlclient
>-lz -o mysql_test
>
> /insert_test: error in loading shared libraries: libmysqlclient.so.6: cannot open
>shared object file: No such file or directory
>
> Under the dirctory of /usr/local/lib/mysql ,I can see libmysqlclient.so.6.
>
>
yes, it is there, but your linker (ld) does not know it is
supposed to look there..
there are many ways to fix that
add /usr/local/lib in the environment variable $LD_LIBRARY_PATH
compile with the -rpath /usr/local/lib option
add /usr/local/lib to /etc/ld.so.conf and run ldconfig
L
--
Laurent Oget, Ph.D. [EMAIL PROTECTED] http://oget.net
Senior Engineer Zvolve Systems Inc http://zvolve.com
Chercheur Associé Liafa http://liafa.jussieu.fr
---------------------------------------------------------------------
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