Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving 'fatal error: cpp-terminal/private/signals.hpp: No such file or directory' error when attempting to include installed cpp-terminal library in my project #392

Open
kburchfiel opened this issue Jan 28, 2025 · 0 comments

Comments

@kburchfiel
Copy link

Thank you for all your hard work on this library! I am quite new to CMake, and my C++ skills are very rusty, so my apologies in advance if the solution to my question is obvious to you.

After downloading and unzipping the cpp-terminal code onto my Linux Mint system and creating a 'build' folder within its directory, I installed it via the following commands:

cmake ..
cmake --build .
cmake --install .

In order to test out its incorporation into a C++ project, I created a separate folder that contains the following two files:

CMakeLists.txt:

cmake_minimum_required(VERSION 3.10)
project(typt2025)
set(CMAKE_CXX_STANDARD 11)
find_package(cpp-terminal REQUIRED)
add_executable(typt2025 typing_test_2025.cpp)
target_link_libraries(typt2025 PRIVATE cpp-terminal::cpp-terminal)

typing_test_2025.cpp:

// Source: https://github.com/jupyter-xeus/cpp-terminal/tree/master

#include "cpp-terminal/terminal.hpp"
#include <iostream>

int main()
{
  std::cout << "Just including terminal.hpp activate \033[31mcolor\033[0m !" << std::endl;
}

Next, I created a 'build' folder within this project folder and ran both cmake .. and cmake --build . However, the latter line resulted in the following error:

[ 50%] Building CXX object CMakeFiles/typt2025.dir/typing_test_2025.cpp.o
In file included from /usr/local/include/cpp-terminal/terminal.hpp:12,
                 from /home/kjb3/D1V1/Documents/!Dell64docs/Programming/CPP/typing_test_2025/typing_test_2025.cpp:4:
/usr/local/include/cpp-terminal/terminal_impl.hpp:13:10: fatal error: cpp-terminal/private/signals.hpp: No such file or directory
   13 | #include "cpp-terminal/private/signals.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/typt2025.dir/build.make:76: CMakeFiles/typt2025.dir/typing_test_2025.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/typt2025.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

For what it's worth, I'm not seeing a 'private' folder within /usr/local/include/cpp-terminal, though I do see both the 'private' folder and a signals.hpp file within the cpp-terminal/ folder in my downloaded copy of the code.

Thanks in advance for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant