GCC search path

Ted Gould ted at gould.cx
Wed Jun 15 14:26:13 MST 2011


On Wed, 2011-06-15 at 13:07 -0700, Nathan England wrote:
> So my question is why isn't gcc finding the necessary .h files unless
> I tell it to include the directories within the /usr/include
> directory?

Because that's not how it works :-)  It doesn't search for the file, it
just checks for it.  So if you had:

  #include <xorg/xorg-server.h>

That would work.  The configure script is probably broken in this case
not to look for the appropriate pkgconfig file.  That usually controls
the -I flags for a build.  For instance you can do:

  $ pkg-config --cflags xorg-server

And see where things are on your system.  On my Ubuntu 11.04 system that
returns:

  -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1  

		--Ted


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20110615/18e01315/attachment.pgp>


More information about the PLUG-discuss mailing list