[Fwd: Cannot find libraries in /usr/local/lib even though they are
in hints files]
Don L. Belcher
don at siad.net
Wed Dec 15 23:13:23 PST 2004
FreeBSD satellite.siad.net 4.10-STABLE FreeBSD 4.10-STABLE #0: Mon Jul
19 00:39:31 PDT 2004
Cannot find libraries in /usr/local/lib even thought they are in the
hints file. Is there something else I need to do?
satellite% ld -o hello -lmpeg hello.o
/usr/libexec/elf/ld: cannot find -lmpeg
satellite% ldconfig -r | grep mpeg
464:-lmpeg.1 => /usr/local/lib/libmpeg.so.1
satellite% ldconfig -r | more
/var/run/ld-elf.so.hints:
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/pth:/usr/local/lib/wine:/usr/local/lib/kde3
satellite% ll /usr/local/lib/libmpeg.a
-r--r--r-- 1 root wheel 132902 Apr 11 2001 /usr/local/lib/libmpeg.a
Using a library in /usr/lib works:
satellite% ld -o hello -lpam hello.o
/usr/libexec/elf/ld: warning: cannot find entry symbol _start;
defaulting to 080481c0
hello.o: In function `main':
hello.o(.text+0x25): undefined reference to `puts'
It also works if I manually add the library path
satellite% ld -o hello -lmpeg -L/usr/local/lib hello.o
/usr/libexec/elf/ld: warning: cannot find entry symbol _start;
defaulting to 080481c8
hello.o: In function `main':
More information about the freebsd-stable
mailing list