> Hi All, Hi! > I just installed latest Debian. Linker ld is not able to find libX11: > > damani@damani-pc:/tmp/binutils-2.15/ld$ ld -lX11 > ld: cannot find -lX11 That's ok - ld only searches some standard directories for libraries, and /usr/X11R6/lib isn't one of them. Here's a (probably non-represen- tative) list of checked directories on my system (strace output, but you can see the locations it tries): open("/usr/bin/../lib/libX11.so", O_RDONLY) = -1 ENOENT open("/usr/bin/../lib/libX11.a", O_RDONLY) = -1 ENOENT open("/usr/i386-linux/lib/libX11.so", O_RDONLY) = -1 ENOENT open("/usr/i386-linux/lib/libX11.a", O_RDONLY) = -1 ENOENT open("/usr/local/lib/libX11.so", O_RDONLY) = -1 ENOENT open("/usr/local/lib/libX11.a", O_RDONLY) = -1 ENOENT open("/lib/libX11.so", O_RDONLY) = -1 ENOENT open("/lib/libX11.a", O_RDONLY) = -1 ENOENT open("/usr/lib/libX11.so", O_RDONLY) = -1 ENOENT open("/usr/lib/libX11.a", O_RDONLY) = -1 ENOENT So, you'll have to specify -L/usr/X11R6/lib explicitly when linking against X libraries. > damani@damani-pc:/tmp/binutils-2.15/ld$ ld -lproc > ld: cannot find -lproc > > All these libs are present in /etc/ld.so.cache : > > damani@damani-pc:/tmp/binutils-2.15/ld$ ldconfig -p | grep libX11 > libX11.so.6 (libc6) => /usr/X11R6/lib/libX11.so.6 > libX11.so (libc6) => /usr/X11R6/lib/libX11.so > damani@damani-pc:/tmp/binutils-2.15/ld$ ldconfig -p | grep proc > libproc-3.2.5.so (libc6) => /lib/libproc-3.2.5.so Heh, pay close attention to the library name (took me 10 minutes to see it, too ;-) ): The dash doesn't end the name... jcn@hejre:~$ ld -lproc-3.2.5 ld: warning: cannot find entry symbol _start; not setting start address Found. :-) Regards, Jan -- Jan C. Nordholz <jckn At gmx net>
Attachment:
signature.asc
Description: Digital signature