Slackware 3.1 'ld' cannot find libX11

Slackware 3.1 'ld' cannot find libX11

Post by Jon Brumfit » Thu, 05 Sep 1996 04:00:00



I have installed Slackware 3.1 but the loader (ld) cannot find
the X11 library:

  >gcc -o foo foo.c -lX11
  /usr/i486-linux/bin/ld: cannot open -lX11: No such file or directory

However, when I explicitly give the library path it is fine:

  >gcc -o foo foo.c -L/usr/X11/lib -lX11

Could someone tell me where the loader gets its default search
path from?

Thanks


 
 
 

Slackware 3.1 'ld' cannot find libX11

Post by Jon Brumfit » Thu, 05 Sep 1996 04:00:00


I have installed Slackware 3.1 but the loader (ld) cannot find
the X11 library:

  >gcc -o foo foo.c -lX11
  /usr/i486-linux/bin/ld: cannot open -lX11: No such file or directory

However, when I explicitly give the library path it is fine:

  >gcc -o foo foo.c -L/usr/X11/lib -lX11

Could someone tell me where the loader gets its default search
path from?

Thanks



 
 
 

Slackware 3.1 'ld' cannot find libX11

Post by Jon Brumfit » Thu, 05 Sep 1996 04:00:00


I have installed Slackware 3.1 but the loader (ld) cannot find
the X11 library:

  >gcc -o foo foo.c -lX11
  /usr/i486-linux/bin/ld: cannot open -lX11: No such file or directory

However, when I explicitly give the library path it is fine:

  >gcc -o foo foo.c -L/usr/X11/lib -lX11

Could someone tell me where the loader gets its default search
path from?

Thanks


 
 
 

Slackware 3.1 'ld' cannot find libX11

Post by Jon Brumfit » Thu, 05 Sep 1996 04:00:00


I have installed Slackware 3.1 but the loader (ld) cannot find
the X11 library:

  >gcc -o foo foo.c -lX11
  /usr/i486-linux/bin/ld: cannot open -lX11: No such file or directory

However, when I explicitly give the library path it is fine:

  >gcc -o foo foo.c -L/usr/X11/lib -lX11

Could someone tell me where the loader gets its default search
path from?

Thanks


 
 
 

Slackware 3.1 'ld' cannot find libX11

Post by B.A.McCau.. » Thu, 05 Sep 1996 04:00:00



>  >gcc -o foo foo.c -lX11
>  /usr/i486-linux/bin/ld: cannot open -lX11: No such file or directory

>However, when I explicitly give the library path it is fine:

>  >gcc -o foo foo.c -L/usr/X11/lib -lX11

>Could someone tell me where the loader gets its default search
>path from?

/usr/lib/ldscripts/elf_i386.x*

Exactly which script is used is based on some strange criteria which I
don't understand but I think relate to whether you are making a static
execuatable, a dynamicly linked executable, an object file, a shared
library or so on.

--

 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ | http://wcl-l.bham.ac.uk/~bam/