shawwn / noh

An open source implementation of Icefrog's DotA, with a pretty amazing engine. Builds in 3 minutes flat; cross-platform.
197 stars 31 forks source link

Missing #include <functional>? #1

Open ghost opened 1 year ago

ghost commented 1 year ago

I tried building this on OpenSUSE 15.5 with gcc 12, and got the following error.

In file included from /home/alex/repos/noh/src/k2/c_label.cpp:19:
/home/alex/repos/noh/src/k2/c_resourcewatcher.h:19:10: error: ‘function’ in namespace ‘std’ does not name a template type
   19 |     std::function<void ()>      m_fOnReload;
      |          ^~~~~~~~
/home/alex/repos/noh/src/k2/c_resourcewatcher.h:12:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
   11 | #include "i_resourcewatcher2.h"
  +++ |+#include <functional>
   12 | //=============================================================================

Adding that include to i_resourcewatcher2.h fixed that issue for me.

shawwn commented 1 year ago

Thank you! Someone else emailed about this too. I'll fix it and add all of you to the credits once my wife and I are out of the hospital.