After installing XQuartz you may add a symlink to your X11 installation folder by just entering
(安装XQuartz,并建立X11到系统库的硬连接)
sudo ln -s /opt/X11/include/X11 /usr/local/include/X11
sudo ln -s /opt/X11/include/X11 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10..sdk/usr/include/
(注释:ln 命令 建立硬连接)