Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Error X11/Xlib.h: No such file or directory

I'm trying to compile some C-code using gcc, and I keep getting the following error: "X11/Xlib.h: No such file or directory". I know that I need to "somehow" identify the Path information for these X11 lib's, etc, but I do not know HOW to do that. I tried adding path definitions to my .profile file - did not work. I have X11 installed, and supposedly I installed the SDK. Can anyone help me with this

2.33 GHz Core-2 MacBook Pro, Mac OS X (10.4.10), gcc compiler

Posted on Sep 17, 2007 11:37 AM

Reply
5 replies

Sep 17, 2007 9:21 PM in response to Christopher Davis1

If you're not sure if you have the SDKs, can you confirm you have the files under /Developer? Check for /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/X11

I don't remember having to do anything special to get gcc to find these files.

From what I've noted, the usual trigger seems to be that the X11SDK.pkg package wasn't installed.

Typical PATH export is:
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"

If you're working with Fink, there's a call to the following needed:
. /sw/bin/init.sh
See http://finkproject.org/doc/users-guide/install.php

But I'd first make sure the X11 SDK was installed. I'd guess that is missing.

Error X11/Xlib.h: No such file or directory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.