I want to create a a text based interface (TUI) software. I found FTXUI library in GitHub and want to use it, so I downloaded it to my computer. The project repository structure is:
FTXUI-master
├───.github
├───doc
├───examples
│ ├───component
│ ├───dom
│ ├───html
│ └───util
├───include
│ └───ftxui
│ ├───component
│ ├───dom
│ ├───screen
│ └───util
├───other
└───src
└───ftxui
├───component
├───dom
└───screen
I am using Netbeans 8.2 RC and Mingw-w64 compiler, first I tried to add the includes and the sources in Netbeans adding the "include" and "src" from FTXUI to the include and source file paths in Netbeans, like this:
CppApplication
│
│
├───HeaderFiles
│ └include
│ └───ftxui
│ ├───component
│ ├───dom
│ ├───screen
│ └───util
│
├───SourceFiles
│ └──main.cpp
│ └src
│ └───ftxui
│ ├───component
│ ├───dom
│ ├───screen
│ └───util
├───TestFiles
└───ImportantFiles
The main.cpp file content is:
#include <cstdlib>
#include "ftxui/dom/elements.hpp"
#include "ftxui/screen/screen.hpp"
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
using namespace ftxui;
// Define the document
Element document =
hbox({
text(L"left") | border,
text(L"middle") | border | flex,
text(L"right") | border,
});
auto screen = Screen::Create(
Dimension::Full(), // Width
Dimension::Fit(document) // Height
);
Render(screen, document);
std::cout << screen.ToString() << std::endl;
return 0;
}
The output I got was:
cd 'C:\Users\CurrentUser\Documents\NetBeansProjects\CppApplication_2'
C:\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/CurrentUser/Documents/NetBeansProjects/CppApplication_2'
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_2.exe
make.exe[2]: Entering directory `/c/Users/CurrentUser/Documents/NetBeansProjects/CppApplication_2'
mkdir -p build/Debug/MinGW-Windows/_ext/3a58e87f
rm -f "build/Debug/MinGW-Windows/_ext/3a58e87f/checkbox.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/MinGW-Windows/_ext/3a58e87f/checkbox.o.d" -o build/Debug/MinGW-Windows/_ext/3a58e87f/checkbox.o ../../../Desktop/FTXUI-master/FTXUI-master/src/ftxui/component/checkbox.cpp
../../../Desktop/FTXUI-master/FTXUI-master/src/ftxui/component/checkbox.cpp:5:10: fatal error: ftxui/component/checkbox.hpp: No such file or directory
#include "ftxui/component/checkbox.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make.exe[2]: *** [build/Debug/MinGW-Windows/_ext/3a58e87f/checkbox.o] Error 1
make.exe[2]: Leaving directory `/c/Users/CurrentUser/Documents/NetBeansProjects/CppApplication_2'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/CurrentUser/Documents/NetBeansProjects/CppApplication_2'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s)
Thanks in advance for the help.
