If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > GCC & MYSQL: "/usr/bin/ld: cannot find -lmysqlclient"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-05, 13:34
guarriman guarriman is offline
Registered User
 
Join Date: Mar 2005
Posts: 7
GCC & MYSQL: "/usr/bin/ld: cannot find -lmysqlclient"

Hi.

On Linux FC2 with mySQL 4.1, I'm trying to compile a very simple C
program
by using GCC, but I get this error message:

---------------------
[root@pc]# gcc -o hello -I'/usr/src/redhat/BUILD/mysql-4.1.9/include/'
-L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm hello.c
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
------------------

I checked:
--------------------
[root@pc]# /sbin/ldconfig -v | grep libmysqlclient
libmysqlclient_r.so.10 -> libmysqlclient_r.so.10.0.0
libmysqlclient.so.10 -> libmysqlclient.so.10.0.0

[root@pc]# echo $LD_LIBRARY_PATH
/usr/lib/mysql:

[root@pc]# find . -name "*libmysqlclient*"
./usr/lib/mysql/libmysqlclient.so.10.0.0
./usr/lib/mysql/libmysqlclient.so.10
./usr/lib/mysql/libmysqlclient_r.so.10.0.0
./usr/lib/mysql/libmysqlclient_r.so.1
----------------------

What could I doing wrong? Regards.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On