At 9:19 AM -0500 04-10-2000, PHILLIPS, CORY H. (JSC-OA wrote:
>I installed MySQL (3.22) from a tar.gz file and I have verified the
>development libraries are there. I'm trying to compile and link a C
>client program. I am familiar with C, but not very familiar with compiling
>and linking with gcc. After I compile and link my program, I get a runtime
>error stating "No such file or directory" on the libmysqlclient.so.6 library
>file (This file it is trying to link with is a symbolic link that points to
>another file). Here are the commands I issued to compile/link.
>$ gcc -c -I/usr/local/include/mysql myclient.c
>$ gcc -o myclient myclient.o -L/usr/local/lib/mysql -lmysqlclient
>Both of the command completed without errors, however I'm getting a runtime
>error. I'm not sure why it can't find/load the library file when it runs,
>yet the link command worked fine.
The runtime link editor probably doesn't know that it needs to look in the
/usr/local/lib/mysql directory. What kind of system are you on? The way
to fix the problem depends on your OS.
>I'm using the example code and commands from the NewRiders "MySQL" book by
>Paul DuBois. Excellent book by the way. This MySQL stuff is really cool.
>It has some powerful features yet easy to use.
Thanks for the kind words about the book.
Paul DuBois, paul@stripped