skip to Main Content

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


  1. I used these flags to compile with gcc:

    g++ -IFTXUI/include -LFTXUI/build [cpp file] -lftxui-component -lftxui-dom -lftxui-screen
    

    where FTXUI contains the clone of the repo.

    Login or Signup to reply.
  2. 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:

    [requires]
    ftxui/5.0.0
    
    [options]
    ftxui/*:shared=False
    
    [layout]
    cmake_layout
    
    [generators]
    CMakeDeps
    CMakeToolchain
    

    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

    find_package(ftxui REQUIRED)
    target_link_libraries(YOUR_TARGET ftxui::ftxui)
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search