vtnerd / motrix

Real-time terminal visualizer for the monero daemon
Other
25 stars 4 forks source link

build error std::runtime_error #3

Closed Criispin closed 6 months ago

vtnerd commented 3 years ago

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?

Criispin commented 3 years 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"};

https://github.com/vtnerd/motrix/blob/163ec8f04c15d6024d54c79f6d6c5b336ecb0446/src/display/falling_text.cpp#L86

nalal commented 3 years ago

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.

vtnerd commented 3 years ago

The #include <stdexcept> should be in those two cpp fies, which call throw std::runtime_error{...}, as opposed to indirectly pulled from headers.

jeffro256 commented 6 months ago

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

vtnerd commented 6 months ago

@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.

Ericmagsllonstrigs commented 6 months ago

Very

Ericmagsllonstrigs commented 6 months ago

M

Ericmagsllonstrigs commented 6 months ago
Ericmagsllonstrigs commented 6 months ago

I r