From e1d7d1bca76af003ef9117bbf3d51ce56945c17f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 27 Sep 2023 10:20:18 +0200 Subject: [PATCH] Fix a link issue on mingw/msys2 --- common/view/zoom_controller.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/view/zoom_controller.cpp b/common/view/zoom_controller.cpp index 2985adb973..1bd26df51f 100644 --- a/common/view/zoom_controller.cpp +++ b/common/view/zoom_controller.cpp @@ -108,6 +108,12 @@ double ACCELERATING_ZOOM_CONTROLLER::GetScaleForRotation( int aRotation ) return zoomScale; } +#ifdef __MINGW32__ +// For some reason, this is needed to avoid a link issue +// (undefined reference to ACCELERATING_ZOOM_CONTROLLER::DEFAULT_TIMEOUT not found) +constexpr ACCELERATING_ZOOM_CONTROLLER::TIMEOUT ACCELERATING_ZOOM_CONTROLLER::DEFAULT_TIMEOUT; +#endif + CONSTANT_ZOOM_CONTROLLER::CONSTANT_ZOOM_CONTROLLER( double aScale ) : m_scale( aScale ) {