# Xlib

5 Hacker News commenters recommended Xlib and 3 criticized it, November 2025 to November 2026. It was recommended in 4 of 13 months.

**Verdict:** Free C library for X11 windows that people find easier than GTK for simple apps; critics call its API awkward and poorly designed.

## Why people recommend it

- Easier than GTK for simple apps (2 comments): "it was easier to either use Xlib directly or go the gtk route" ([source](https://news.ycombinator.com/item?id=49816431)) "building them with raw xlib or tcl is easier than gtk" ([source](https://news.ycombinator.com/item?id=48171158))

## What people warn about

- Poorly designed, awkward API (3 comments): "The Xlib API also sucks compared to Win32 or Cocoa" ([source](https://news.ycombinator.com/item?id=47488231)) "writing code against Xlib is horrible" ([source](https://news.ycombinator.com/item?id=47479721)) "nor is it even a suitable API surface" ([source](https://news.ycombinator.com/item?id=47486073))

## Alternatives hackers recommend

- [GLFW](https://hackerapproved.com/p/glfw.md): 9 recommend
- [winit](https://hackerapproved.com/p/winit.md): 6 recommend
- [libxcb](https://hackerapproved.com/p/xcb.md): 6 recommend

## Cite as

Hacker Approved, "Xlib", https://hackerapproved.com/p/xlib/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
