*BSD News Article 95050


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news-peer.sprintlink.net!news.sprintlink.net!Sprint!howland.erols.net!sol.ctr.columbia.edu!startide.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Compiling and linking with X.
Date: 9 May 1997 14:22:40 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 30
Message-ID: <5kvbvh$14u$1@sol.ctr.columbia.edu>
References: <3372A499.41C67EA6@silas.cc.monash.edu.au>
NNTP-Posting-Host: startide.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:40640

Daring to challenge the will of the almighty Leviam00se, David Henshaw
(dhenshaw@silas.cc.monash.edu.au) had the courage to say:

: Hi all,

: I'm trying to compile a program that uses some X libs.
: The includes are specified as required.
: i.e. #include <X11/Xlib.h>

: I keep getting the following errors when I try compiling with
: cc -o xidle xidle.c -lX11

Bzzztt! I'm sorry that's incorrect, but thanks for playing. The correct
answer is:

cc -I/usr/X11R6/include -o xidle xidle.c -lX11

The compiler only searches a few header directories by default, and
/usr/X11R6/include is not one of them.

-Bill

--
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
  "Now, that's "Open" as used in the sentence "Open your wallet", right?"
=============================================================================