in reply to Cannot find X include files

What distribution are you using? Most distributions put the headers and libraries needed for development in separate packages which aren't installed by default.

For example, on Fedora Core 1, you will need XFree86-devel for the X includes.