Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2004 22:12:23 +0000
From:      Richard Bradley <rtb27@cam.ac.uk>
To:        freebsd-hackers@freebsd.org
Subject:   ld can't find libraries
Message-ID:  <200403312312.23601.rtb27@cam.ac.uk>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403312312.23601.rtb27>