[ale] gcc ques

Fulton Green ale at FultonGreen.com
Tue Apr 23 23:27:26 EDT 2002


Fletch already gave some good answers. Here's my contribs ...

On Tue, Apr 23, 2002 at 08:59:01PM -0400, John J. Cruz wrote:
> I use the following gcc command:
> gcc -o NUcompass -lm -lX11 NUcompass.o
> 
> response displayed
> /usr/bin/ld: cannot find -lX11
> 
> X11 >> /usr/X11R6/lib/libX11.so.6
> 
> echo $PATH includes /usr/X11R6/lib

The linkage step is probably going to need - a -L option (similar to -I)
that includes the directory that contains the X Window libraries (most
likely /usr/X11R6/lib in your case).

> I don't understand why gcc insist on looking in directory /usr/bin when
> the library in question is in /usr/X11R6/lib?  For that matter how do I
> change gcc to look somewhere else?

The -L option instructs gcc to add a directory to its library search path.

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list