]> sigrok.org Git - pulseview.git/commitdiff
MinGW: Fix a compile error due to a missing #include.
authorUwe Hermann <redacted>
Sat, 10 Feb 2018 21:01:26 +0000 (22:01 +0100)
committerUwe Hermann <redacted>
Sat, 10 Feb 2018 21:10:10 +0000 (22:10 +0100)
  In file included from [...]/pv/globalsettings.cpp:20:0:
  [...]/pv/globalsettings.hpp:31:12: error: 'std::function' has not been declared
   using std::function;
              ^
  test/CMakeFiles/pulseview-test.dir/build.make:88: recipe for target 'test/CMakeFiles/pulseview-test.dir/__/pv/globalsettings.cpp.obj' failed
  make[2]: *** [test/CMakeFiles/pulseview-test.dir/__/pv/globalsettings.cpp.obj] Error 1
  make[2]: *** Waiting for unfinished jobs....
  [  5%] Building CXX object CMakeFiles/pulseview.dir/pv/globalsettings.cpp.obj
  In file included from [...]/pv/globalsettings.cpp:20:0:
  [...]/pv/globalsettings.hpp:31:12: error: 'std::function' has not been declared
   using std::function;
              ^

Add #include <functional> everywhere where std::function is used. Only
the occurence in globalsettings.hpp was causing an actual build failure
on MinGW, though.

pv/binding/device.hpp
pv/globalsettings.hpp
pv/session.hpp

index dcef9470cc12e091565871486d1ef3d6a8799053..aceac8cc6f2fc3346f1c36de9c58c5b6b58d081b 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef PULSEVIEW_PV_BINDING_DEVICE_HPP
 #define PULSEVIEW_PV_BINDING_DEVICE_HPP
 
+#include <functional>
+
 #include <boost/optional.hpp>
 
 #include <QObject>
index ea43491c35b1a2b63d3656cbf375a8940113df5b..093ac59b59ca584ba028d3313cfd6753a3065f8a 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef PULSEVIEW_GLOBALSETTINGS_HPP
 #define PULSEVIEW_GLOBALSETTINGS_HPP
 
+#include <functional>
 #include <map>
 
 #include <glib.h>
index 9148ba9bdcaafd8985f5b1f7c833f87d3b1e81f0..2ee31cfee5afb8ef6de44171322d1d20086e755a 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef PULSEVIEW_PV_SESSION_HPP
 #define PULSEVIEW_PV_SESSION_HPP
 
+#include <functional>
 #include <map>
 #include <memory>
 #include <mutex>