From: Uwe Hermann Date: Sat, 10 Feb 2018 21:01:26 +0000 (+0100) Subject: MinGW: Fix a compile error due to a missing #include. X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=7671200bd71de8cdd922b41b025ea18de6422345 MinGW: Fix a compile error due to a missing #include. 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 everywhere where std::function is used. Only the occurence in globalsettings.hpp was causing an actual build failure on MinGW, though. --- diff --git a/pv/binding/device.hpp b/pv/binding/device.hpp index dcef947..aceac8c 100644 --- a/pv/binding/device.hpp +++ b/pv/binding/device.hpp @@ -20,6 +20,8 @@ #ifndef PULSEVIEW_PV_BINDING_DEVICE_HPP #define PULSEVIEW_PV_BINDING_DEVICE_HPP +#include + #include #include diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index ea43491..093ac59 100644 --- a/pv/globalsettings.hpp +++ b/pv/globalsettings.hpp @@ -20,6 +20,7 @@ #ifndef PULSEVIEW_GLOBALSETTINGS_HPP #define PULSEVIEW_GLOBALSETTINGS_HPP +#include #include #include diff --git a/pv/session.hpp b/pv/session.hpp index 9148ba9..2ee31cf 100644 --- a/pv/session.hpp +++ b/pv/session.hpp @@ -20,6 +20,7 @@ #ifndef PULSEVIEW_PV_SESSION_HPP #define PULSEVIEW_PV_SESSION_HPP +#include #include #include #include