jupyter-xeus / cpp-terminal

C++ library for writing multiplatform terminal applications
https://jupyter-xeus.github.io/cpp-terminal/
Other
527 stars 55 forks source link

Issue with file headers #352

Closed Greeniac closed 8 months ago

Greeniac commented 9 months ago

So if you include terminal.hpp in your cpp code with #include "cpp-terminal/terminal.hpp" it detects it fine, but inside terminal.hpp it tries to include terminal_impl.hpp with #include "cpp-terminal/terminal_impl.hpp" which is wrong, because its searching for cpp-terminal/terminal_impl.hpp relative to terminal.hpp's path, but since both files are in the same folder it cannot find it, so it should be #include "terminal_impl.hpp" instead, that goes the same for all header files.

flagarde commented 9 months ago

Hi, I'm not sure I understand your problem. Does this really triggers error at compile time ?

Greeniac commented 9 months ago

Yeah and here is a screenshot and the code:

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

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

errors

flagarde commented 9 months ago

It seems you are not using cmake right? Have you given the path of the include folder to gcc?