Date: Wed, 31 Mar 2004 17:39:11 -0500 From: jason <jason@ec.rr.com> To: Richard Bradley <rtb27@cam.ac.uk> Cc: freebsd-hackers@freebsd.org Subject: Re: ld can't find libraries Message-ID: <406B488F.2040602@ec.rr.com> In-Reply-To: <200403312312.23601.rtb27@cam.ac.uk> References: <200403312312.23601.rtb27@cam.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Richard Bradley wrote:
>Hi all,
>
>I can't get ld to recognise some "so" libraries without using the -L option:
>
>%cat test.c
>int main () {}
>%ls /usr/local/lib/libsqlite*
>/usr/local/lib/libsqlite.a /usr/local/lib/libsqlite.so.2
>/usr/local/lib/libsqlite.so
>%gcc test.c -lsqlite
>/usr/bin/ld: cannot find -lsqlite
>%gcc test.c -L/usr/local/lib -lsqlite
>%
>
>However, /usr/local/lib is in its search path:
>
>%ldconfig -r | grep sql
> search
>directories: /usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/compat:/usr/local/lib/mysql:/usr/local/lib/compat/pkg:/usr/local/lib/wine:/usr/local/lib/kde3
> 504:-lsqlite.2 => /usr/local/lib/libsqlite.so.2
> 517:-lmysqlclient_r.12 => /usr/local/lib/mysql/libmysqlclient_r.so.12
> 518:-lmysqlclient.12 => /usr/local/lib/mysql/libmysqlclient.so.12
>%
>
>What is going on here?
>
>Any help would be much appreciated,
>
>
>Rich
>
>_______________________________________________
>freebsd-hackers@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>
>
>
Try adding the files to the config file at
/usr/compat/linux/etc/ld.so.conf and ld-elf.so.conf. Then run ldconfig.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?406B488F.2040602>
