FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
Amalgamated

Amalgamated version

The amalgamated version is a single-header (ftxui.hpp) and single-source (ftxui.cpp) version of the library. It is an alternative way to integrate FTXUI into your project, especially if you don't want to use a package manager or a complex build system.

A truly single-file header-only version (ftxui_all.hpp) is also available.

How to get it?

You can get the amalgamated files in several ways:

  1. GitHub Releases (Recommended): Download the ftxui-amalgamated.zip from the latest release. Note: This will be officially available starting from version 7.0.0. For older versions or before the 7.0.0 release, please use the CI artifacts below. It contains ftxui.hpp, ftxui.cpp, and the header-only ftxui_all.hpp.
  2. CI Artifacts: If you want the absolute latest version from main (or before the official 7.0.0 release), you can download the artifacts from the Amalgamate workflow.
  3. Manual Generation: Run the following command from the root of the cloned repository:
    ./tools/amalgamate.py

How to use it?

Option 1: Split Header/Source (Recommended for build speed)

Copy ftxui.hpp and ftxui.cpp into your project. Include ftxui.cpp in your source list.

Option 2: Header-Only

Copy ftxui_all.hpp into your project. In exactly one C++ file, define FTXUI_IMPLEMENTATION before including the header:

#define FTXUI_IMPLEMENTATION
#include "ftxui_all.hpp"

In other files, you can simply include it without the define:

#include "ftxui_all.hpp"

Compilation

When compiling your project, ensure you are using C++17 and linking against threads.

g++ -std=c++17 your_main.cpp [ftxui.cpp] -o your_app -lpthread
Previous
Installation