Denys S. Denys S. - 1 year ago 152
Linux Question

X11/Xlib.h not found in Ubuntu

I'm trying to write a rather trivial program using open gl on linux, but at a compile time it says:

Compile thumb : egl <= cuberenderer.c
In file included from
from /path/cuberenderer.c:7:
error: X11/Xlib.h: No such file or
error: X11/Xutil.h: No such file or

I'm totally new to GL and have no idea what's wrong.

Answer Source

A quick search using...

apt-file search Xlib.h

Turns up the package libx11-dev but you shouldn't need this for pure OpenGL programming. What tutorial are you using?

You can add Xlib.h to your system by running the following...

sudo apt-get install libx11-dev
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download