/* gcc $(pkg-config --cflags --libs x11 gl) */ #include #include #include int main (void) { int major, minor; Display *device; device = XOpenDisplay (NULL); assert (glXQueryVersion (device, &major, &minor)); printf ("major: %d minor: %d\n", major, minor); XCloseDisplay (device); return 0; }