cannot find -lX11 on RedHat 6.2

cannot find -lX11 on RedHat 6.2

Post by Mat » Tue, 24 Dec 2002 12:06:57



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

#define X11     (blank)

or

#define X11 /usr.X11R6/lib

or others, but I still get  the message cannot find -lX11

X seems to be working fine apart from this. What is this?

 
 
 

cannot find -lX11 on RedHat 6.2

Post by Dances With Crow » Tue, 24 Dec 2002 12:19:25


On 22 Dec 2002 19:06:57 -0800, Matt staggered into the Black Sun and
said:

Quote:> 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

 
 
 

cannot find -lX11 on RedHat 6.2

Post by Paul Lutu » Tue, 24 Dec 2002 14:52:33



> 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 ...

The "-lX11" means "link with the X11 library".

You haven't identified:

1. Distribution.
2. Platform.
3. Compiler.
4. Language.

You need to ask this in a programming newsgroup. I would be more specific,
but to do that, you would have to be more specific.

--
Paul Lutus
http://www.arachnoid.com