I use the -lmysqlclient  command line argument to gcc
under Linux.  It compiles fine and everything works
great.

However, if I move the compiled binary to another
system, which doesn't have the mysql client libs
installed, when I try to start the program, I get:

error while loading shared libraries:
libmysqlclient.so.10: cannot open shared object file:
No such file or directory

Now after reading the gcc man page, it says the -l
option wraps 'lib' and '.a' around whats specified,
thus looking for the library libmysqlclient.a, which
is a static library, no?  So how come its still
looking for a shared,  .so  library?

Also, when looking in the mysql/lib directory, I see a
libmysqlclient.la file.  What uses this?

If someone could explain to me why this behavior is
happending, and maybe a little linking/shared/static
background, since I am confused now (thinking that .a
libs always are statically linked automatically).  I
understand I could use -static, but since -l uses a .a
lib filename, I thought this would be implied.

Thank you very much,

Hans


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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