Viet
Viet

Reputation: 18414

Tiny C++ cross-platform GUI toolkit

Which C++ cross-platform GUI toolkit gives smallest footprint with both static and dynamic builds? I don't need a very sophisticated GUI, just basic controls & widgets.

Upvotes: 8

Views: 17779

Answers (5)

ahcox
ahcox

Reputation: 9970

There are several minimal options in the long list of cross-platform C++ UI libraries here: https://philippegroarke.com/posts/2018/c++_ui_solutions/ I think you'd have to evaluate them yourself.

Upvotes: 0

Jerome
Jerome

Reputation: 236

With the Ecere SDK, you can build a statically linked executable under 1 MB. A dynamic runtime library can also be built under 2 MB. Ecere runs in a variety of display drivers, including X11, GDI, OpenGL, Direct3D. It was originally designed for in-game GUIs, but it's now a rich general purpose cross-platform GUI toolkit.

The SDK comes with a compiler for the eC language, an OO language which compiles down to native code, that can be linked with C++ at the C level (i.e. extern "C").

eC shares many basic OO concepts and syntax of C++, but offers simpler, more elegant code, especially for GUI development: it has properties, instance virtual methods for events, you use '.' instead of '->' for accessing heap objects members. It still fully supports the entire C syntax, grammar and features. eC rids you of the pain of header files and prototypes as well, with a more modern import mechanism.

Upvotes: 3

mloskot
mloskot

Reputation: 38942

The Tk from Tcl/Tk is well known of its small memory footprint. Details in Memory Footprint Comparisons on Tcl/Tk Wiki. Both, Tcl and Tk, are extremely simple to use with C++/Tcl and C++/Tk libraries. They were inspired by Boost.Python

Upvotes: 3

deft_code
deft_code

Reputation: 59337

try cegui. It was designed for game guis, which have to be light (for console games). I've never tried fltk. It may be more suitable.

Upvotes: 1

oscarkuo
oscarkuo

Reputation: 10453

the smallest one I've heard of is fltk

Upvotes: 9

Related Questions