At 10:50 AM -0500 04-10-2000, PHILLIPS, CORY H. (JSC-OA wrote:
>Wow, thanks for the reply Paul. I have really enjoyed your book. It's laid
>out very well and easy to use. I have learned alot. I have used O'Reilly's
>"MySQL & mSQL" as well, but I like your book better. It covers more depth.
>I would recommend it to anyone using MySQL.
>I'm using Linux (RedHat 6.0) on Intel. I'm not sure of the version of my
>gcc compiler. I'm guessing you realize I'm using your examples from the
>first few pages from the chapter covering the C API.
>I have tried adding the path to the ld.so.conf file. Someone else, Jeremy
>Cole, suggested this, although I did not know to issue the ldconfig command
>afterward. I will have to try the ldconfig command.
That will probably do it. You'll need to be root to modify /etc/ld.so.conf
and to run the ldconfig command.
>I have also gotten this suggestion:
>>> try to adding -ln at the end of the line
>From: Paul DuBois [mailto:paul@stripped]
>Sent: Monday, April 10, 2000 10:06 AM
>To: PHILLIPS, CORY H. (JSC-OA); 'mySQL List'
>Subject: Re: Compile and Link C program Question
>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
>>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
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread33745@stripped
>To unsubscribe, send a message to:
Paul DuBois, paul@stripped