doc/installation_amalgamated.md
@page installation_amalgamated Amalgamated @tableofcontents
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.
You can get the amalgamated files in several ways:
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.main (or
before the official 7.0.0 release), you can download the artifacts from the
Amalgamate workflow../tools/amalgamate.py
Copy ftxui.hpp and ftxui.cpp into your project. Include ftxui.cpp in your
source list.
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"
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 |