On 22 Dec 2002 19:06:57 -0800, Matt staggered into the Black Sun and
> I'm installing a package (sm). The Makefile uses a variable X11
> defined in an options.h file.
> X11 is used by e linker as /usr/bin/ld -lX11 ...
> I tried (in options.h)
> #define X11 /usr/X11R6/lib/X11
> or others, but I still get the message cannot find -lX11
> X seems to be working fine apart from this. What is this?
When you compile a program, the compiler looks for static libraries to
build against. These static libraries follow a convention, so that if
you feed -lX11 to the compiler, it looks for a file called "libX11.a" in
directories defined by the OS and compiler and any -L options specified
on the compiler's command line.
When programs that use X11 libraries are executed, they are linked
against the dynamic library libX11.so at runtime. Only compilation
requires the static libraries.
In Redhat 6.2 (upgrade! 8.0 is out!), libX11.a is in the X development
packages. These packages are on your distro CDs somewhere; they almost
certainly match the glob "*X*devel*". If these packages are not
installed, you will get errors very similar to the ones you describe
above. Install those packages, then try compiling again. HTH,
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL