Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2004 14:56:00 -0800
From:      Tim Kientzle <tim@kientzle.com>
To:        Richard Bradley <rtb27@cam.ac.uk>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: ld can't find libraries
Message-ID:  <406B4C80.70708@kientzle.com>
In-Reply-To: <406B488F.2040602@ec.rr.com>
References:  <200403312312.23601.rtb27@cam.ac.uk> <406B488F.2040602@ec.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Richard Bradley wrote:
>>
>> I can't get ld to recognise some "so" libraries without using the -L 
>> option:
>>
>> %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

ldconfig has nothing to do with ld.

ldconfig is associated with the dynamic linker (ld-elf.so.1),
which locates dynamic libraries at run-time.

ld has a completely separate mechanism for
locating (static or dynamic) libraries at compile-time.

There may be a way to set the defaults
for ld, but I don't happen to know it.

Tim Kientzle



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