Skip to content
You are viewing documentation for v7.0.1. Switch to latest (main).

Linux Distros & Single Header ​

Install pre-built system packages on Linux, or drop the amalgamated single-header/single-source distribution directly into any C++17 project.

Linux Distribution Packages ​

Community Packages

Distribution packages are maintained by their respective Linux communities and may lag behind the latest GitHub release.

bash
sudo apt install libftxui-dev
bash
yay -S ftxui
bash
sudo zypper addrepo https://download.opensuse.org/repositories/devel:libraries:c_c++/openSUSE_Leap_$releasever/devel:libraries:c_c++.repo
sudo zypper install ftxui

Once installed, link via CMake:

cmake
find_package(ftxui REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main
  PRIVATE ftxui::screen
  PRIVATE ftxui::dom
  PRIVATE ftxui::component
)

Amalgamated (Single Header / Single Source) ​

If you prefer not to use a build system or package manager, FTXUI provides amalgamated releases:

  • Split (faster builds): ftxui.hpp + ftxui.cpp
  • Header-only: ftxui_all.hpp

How to Get It ​

  1. GitHub Releases (Recommended): Download ftxui-amalgamated.zip from the latest release.
  2. Generate Locally: Run ./tools/amalgamate.py from a clone of the repository.

Usage ​

bash
g++ -std=c++17 main.cpp ftxui.cpp -o my_app -lpthread
cpp
// Define FTXUI_IMPLEMENTATION in exactly ONE .cpp file:
#define FTXUI_IMPLEMENTATION
#include "ftxui_all.hpp"