i get /usr/bin/ld: cannot find -lmysqlclient <-- when trying to compile ONE .c manual

icer

Verified User
Joined
Jun 10, 2005
Messages
22
i get /usr/bin/ld: cannot find -lmysqlclient <-- when trying to compile ONE .c manual

Hey...

-[dev@elatha]$ cc -I/usr/local/include/mysql prog.c -lmysqlclient -lsocket -lnsl -lm -lz
/usr/bin/ld: cannot find -lmysqlclient


Whats wrong with this picture?

We run fbsd 5.4. Box been up over 220 days

We have:

/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient_r.so


BSD does not have /etc/ld.so.conf and we cannot install files fia rpm.

I have gone through the forums already and no help has been found to fix my problem, so ill post this.
 
Last edited:
all good

meh...worked it out with other forms of support.

for all those who have this problem here is the soloution...

Add the -L flag.

so: -L/usr/local/lib/mysql ( after the -I ) enjoy ;)

Feel free to give me a high five / thanks on here if you use my theory for your problem! :)
 
Back
Top