jupyter-xeus / cpp-terminal

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

Issue with file headers #352

Closed Greeniac closed 4 months ago

Greeniac commented 5 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 5 months ago

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

Greeniac commented 5 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 5 months ago

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