PDA

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



icer
02-26-2006, 11:44 PM
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.

icer
02-27-2006, 07:18 AM
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! :)