I’ve been struggling to install the FTXUI library for use in my project. I am using Visual Studio Code, and it seems like there is no guide out there for my particular case even in the documentation.
Tried:
I went through the documentation page and also the GitHub page of the project on installing the FTXUI. With no dedicated section for that, I assumed that installing it would require me to download the packages using either of these methods: "Multiple packages: CMake FetchContent (preferred), vcpkg, pkgbuild, conan." I cannot use CMake as my project can only use a standalone Makefile, and I tried using vcpkg but cannot seem to get it work in Visual Studio Code. With the following error,
error: in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance
Expectation:
I want to install FTXUI in my project repository such that I can link it statically.
2
Answers
I used these flags to compile with gcc:
where FTXUI contains the clone of the repo.
I can suggest using the
ftxui
Conan package for this (https://conan.io/center/recipes/ftxui).Here’s a basic
conanfile.txt
to consume the package:A "getting started" guide for Conan: https://docs.conan.io/2/tutorial/consuming_packages/build_simple_cmake_project.html
For a more seamless integration with CMake, you can include
conan_provider.cmake
from https://github.com/conan-io/cmake-conan in your project.The package can be consumed in CMake with