Closed Criispin closed 6 months ago
my compiler throws this at me
../src/display/falling_text.cpp:86:18: Fehler: »runtime_error« ist kein Element von »std« 86 | throw std::runtime_error{"failed to create ncurses window"};
I can confirm this issue, it seems that the function std::runtime_error
(seen in src/display/falling_text.cpp:86
and src/display/system_warning.cpp:48
) requires the library <stdexcept>
.
Building on Arch, gcc version 10.2.0.
Acutally, I think I see what's happened, it seems that the include in src/display/window.cpp
was supposed to be included in src/display/window.hpp
which is what's inlcuded in the files where this seems to be an issue, moving that include to the header as opposed to the cpp file should resolve this as well.
The #include <stdexcept>
should be in those two cpp fies, which call throw std::runtime_error{...}
, as opposed to indirectly pulled from headers.
Wondering if this will be revisited and the #includes
are added to the .cpp files since it fails to compile with g++ 12.3.0
@jeffro256 I have pushed the necessary includes to get it working with gcc 12+. I have also reverted back to the original system warning message. I am closing this, as its no longer needed.
Very
M
I r
I've looked at this a few times, but I don't see where
<stdexcept>
is needed for these headers. Are there some cpp files that need this header directly?