From 3f17a452b635bae79ceff14a8a66cdf433fe8626 Mon Sep 17 00:00:00 2001 From: weidong Date: Wed, 11 Aug 2021 13:57:28 +0800 Subject: [PATCH] Fix build failure with gcc-10 --- src/event_monitor.cpp | 7 ++++++- src/screen_shot_event.cpp | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/event_monitor.cpp b/src/event_monitor.cpp index 2b72f18..95c4259 100755 --- a/src/event_monitor.cpp +++ b/src/event_monitor.cpp @@ -22,14 +22,19 @@ */ #include "event_monitor.h" +#include "keydefine.h" #include +// gcc 版本大于10时,取消min 宏定义 +#if __GNUC__ == 10 +#undef min +#endif #include #include #include #include #include -#include "keydefine.h" #include +#include EventMonitor::EventMonitor(QObject *parent) : QThread(parent) { diff --git a/src/screen_shot_event.cpp b/src/screen_shot_event.cpp index 05dfbb5..02e9ab8 100755 --- a/src/screen_shot_event.cpp +++ b/src/screen_shot_event.cpp @@ -1,5 +1,9 @@ #include "screen_shot_event.h" #include +// gcc 版本大于10时,取消min 宏定义 +#if __GNUC__ == 10 +#undef min +#endif #include #include #include -- 2.20.1