logoalt Hacker News

badsectoraculatoday at 4:44 AM0 repliesview on HN

Someone else mentioned Lazarus, though that is Object/Free Pascal, not C/C++. The API is based on VCL for Delphi which was designed for the Windows API and even though Lazarus is cross-platform and can use multiple backends (actually i've been playing with writing a FLTK backend[0], though it is in primitive stages and FLTK doesn't really like exposing much of its guts), the API has some windows-isms (e.g. colors are 4 bytes where one byte is used a special marker to indicate system colors, just like in Windows) and the backends even have to implement a small subset of the Windows API to work :-P.

An alternative in C++ would be wxWidgets which has some (light) MFC inspirations, again feeling somewhat Windowsy though not full-on MFC/Win32 since from the beginning it had to work with X Windows / Motif in addition to Win32 (and AFAIK, the Motif backend still works).

Another alternative, even more lightweight would be the aforementioned FLTK. FLTK is also designed to be statically linked with your program (though it can be linked dynamically too if you want) so it only relies on common system libraries (as an example the screenshot in [0] relies only on the C library, the C++ library -because it is needed by FLTK and it is possible to also statically link to that too- and common X11 libraries like libX11, libXft, etc that existed on any Linux desktop system for decades now -- FLTK can also support Wayland, though i haven't tested that).

[0] https://i.imgur.com/W6XbLkr.png