{"slug": "fterm-a-terminal-emulator-library-for-qt-fortran", "title": "Fterm: A terminal emulator library for qt-fortran", "summary": "A developer has released Fterm, a terminal emulator library and widget for qt-fortran that lets Fortran GUI applications embed a terminal, written in pure Fortran plus three lines of C. The author said the project was mostly AI-written and that after back-and-forth with the model, nearly all the generated C code could be rewritten in Fortran, leaving only two variadic functions (ioctl and fcntl) and the errno macro, none of which work with ISO C Binding.", "body_md": "Because if we are writing GUIs in Fortran, they need terminals, right?\n\nThis library is a pure-Fortran (OK, plus three lines of C code) terminal emulator and widget for [qt-fortran](https://github.com/jacobwilliams/qt-fortran), allowing you to include a terminal in your Fortran GUI application.\n\nMostly AI-written. Interestingly, I initially told it to use as little C as possible. But it ended up writing a lot of C code. After some back and forth, it turns out that almost all of it can, in fact, be written in Fortran. What is left are two variadic functions (`ioctl` and `fcntl`) and one macro `errno`, neither of which can be used with ISO C Binding.", "url": "https://wpnews.pro/news/fterm-a-terminal-emulator-library-for-qt-fortran", "canonical_source": "https://fortran-lang.discourse.group/t/fterm-a-terminal-emulator-library-for-qt-fortran/11344#post_1", "published_at": "2026-11-30 05:21:42+00:00", "updated_at": "2026-11-30 05:46:10.537176+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Fterm", "qt-fortran", "Fortran"], "also_reported_by": [], "takeaway": "A terminal emulator for qt-fortran can be built in pure Fortran except for ioctl, fcntl and the errno macro, which cannot be used with ISO C Binding because they are variadic or macro-based.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/fterm-a-terminal-emulator-library-for-qt-fortran", "markdown": "https://wpnews.pro/news/fterm-a-terminal-emulator-library-for-qt-fortran.md", "text": "https://wpnews.pro/news/fterm-a-terminal-emulator-library-for-qt-fortran.txt", "jsonld": "https://wpnews.pro/news/fterm-a-terminal-emulator-library-for-qt-fortran.jsonld"}}