Use FTXUI without CMake #446
-
I would like to compile a program by using g++ Currently I tried to follow the steps on the SFML website and do something similar. g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system If you installed SFML to a non-standard path, you'll need to tell the linker where to find the SFML libraries (.so files): g++ main.o -o sfml-app -L/lib -lsfml-graphics -lsfml-window -lsfml-system We are now ready to execute the compiled program: ./sfml-app How do I do this with FTXUI ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello. Thanks for using FTXUI! You can try this Makefile: run: link
./main
link: compile
c++ \
main.cpp.o \
-o main \
-lftxui-component \
-lftxui-dom \
-lftxui-screen \
-lpthread
compile: main.cpp
c++ \
-std=gnu++17 \
-o main.cpp.o \
-c main.cpp Here is what it gave me, assuming FTXUI is installed to the default system paths and you are using Linux. arthursonzogni@arthursonzogni1:~/programmation/real/ftxui-starter/src$ make
c++ \
-std=gnu++17 \
-o main.cpp.o \
-c main.cpp
c++ \
main.cpp.o \
-o main \
-lftxui-component \
-lftxui-dom \
-lftxui-screen \
-lpthread
./main
╭ Summary ──╮╭ Summary ──╮╭ Summary ─────────────────────────────────────────────╮
│- done: 3││- done: 3││- done: 3 │
│- active: 2││- active: 2││- active: 2 │
│- queue: 9││- queue: 9││- queue: 9 │
╰───────────╯╰───────────╯╰──────────────────────────────────────────────────────╯
╭ Summary ───────────────────────────────────────────────────────────────────────╮
│- done: 3 │
│- active: 2 │
│- queue: 9 │
╰────────────────────────────────────────────────────────────────────────────────╯
╭ Summary ───────────────────────────────────────────────────────────────────────╮
│- done: 3 │
│- active: 2 │
│- queue: 9 │
╰────────────────────────────────────────────────────────────────────────────────╯ |
Beta Was this translation helpful? Give feedback.
Hello. Thanks for using FTXUI!
I recommend using CMake. It would be easier for you. That's said, I am not a cop, happy hacking! Here is the solution:
You can try this Makefile:
Here is what it gave me, assuming FTXUI is installed to the default system paths and you are using Linux.
arthursonzogni@arthursonzogni1:~/programmation/real/ftxui-starter/src$ make c++ \ -std=gnu++17 \ -o main.cpp.o \ -c main.cpp c++ \ main.cpp.o \ -o main \ -lftxui-component \ -lftxui-dom \ -lftxu…