Orange Hat Tech

C Gui Libraries

So you've decided to code a GUI in C. That's probably a horrible decision. But hey, I've made that horrible decision a bunch of times myself, so I can help!

This document has a lot of my own biases in it, and I haven't used most of the tools I'm writing about. I'd recommend that you do your own research before coming to strong conclusions. This document is a starting point, not an ending point.

LGPL is listed as a negative. This is because most people who care about a library being LGPL care because they have to avoid LGPL'd code. (Usually for static linking with closed source software)


Cross platform libraries


Code once, use everywhere. Generally "Everywhere" in this context is Windows, Linux, BSD, and OSX. Android apps have a complicated relationship with C code, and I don't know much about them.

Nuklear

I've used this library extensively. It's my personal favorite.

Libui

I haven't yet used this.

IUP

I've used this library.

LibAgar

I've used this, but ran into a breaking bug that I couldn't fix and the author didn't seem interested in fixing.

GTK+

I haven't used this directly.

c-imgui

I haven't used this.

LCUI

I haven't used this and I can't imagine how it could possibly work.

Tinyfiledialogs

I've used this. It was ok.

Boksi

I made this. It's ok. It uses many of the libraries listed on this page to do its thing.

Raygui

I haven't used this yet

Tk

I haven't used this.

WxC

An effort to expose WxWidgets to C.

XVT


Single platform libraries


You'll need to code a separate solution for each targeted platform. Worth considering if you only need to target a single platform for whatever reason.

Win32 libs

I haven't used this directly.

Xaw

I've used this library lightly.

Motif

I don't have experience with this one.

XForms

I don't have experience with this one.


Similar libraries


Sometimes you're doing something weird, and you need lower level access than most GUI libraries will provide. Don't worry, you can always roll you own!

Oh, and on a personal note? 9 times out of 10, you're making a mistake somewhere if you're looking at these libraries. It's extremely likely that you can use something else to get a better result with less coding.

XLib

I don't have experience with this one.

XCB

I don't have experience with this one. Modern replacement for XLib

Xt

I don't have experience with this one. Built on xlib. Powers XAW and Motif.

GDK

I don't have direct experience with this one.

NanoVG

I've used this. Stands for Nano Vector Graphics.