title: "X11/Xlib.h": no such file or directory on mac os x mountain lion
body: <p>I came across this when I was compiling a simple program:</p>
  
  <pre><code> #include &lt;X11/Xlib.h&gt;
   #include &lt;stdio.h&gt;
   #include &lt;stdlib.h&gt;
  
   Display* display;
  
   int main(){
       display = XOpenDisplay("");
       if (display == NULL) {
           printf("Cannot connect\n");
           exit (-1);
       }
       else{
           printf("Success!\n");
           XCloseDisplay(display);
       }
    }
  </code></pre>
  
  <p>FYI, I have xQuartz installed.
  I compile this program with "g++ -o ex ex.cpp -L/usr/X11R6/lib -lX11" command.</p>