From 86c8fdef8d69830fa8b5333f5883209c2ea989b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 Sep 2015 00:03:42 +0200 Subject: [PATCH] Fix linking of tests on MinGW-w64 GCC 5.1. It worked flawlessly when crosscompiled from Linux, but compiling that natively causes the linker to loudly complain about undefined references to ConfigurationValue structs. I think it worked well under 4.9.2 (but that mess had a slew of other ugly problems, such as complete inability to produce non-crashing C++11 code under x64). The linker error is caused only because I tried to reduce binary bloat, so I'm just disabling that for MinGW and screw that. No problem under MSVC. --- src/Magnum/Math/Range.h | 2 +- src/Magnum/Math/RectangularMatrix.h | 2 +- src/Magnum/Math/Vector.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 2d355c061..771b4202b 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -580,7 +580,7 @@ template struct ConfigurationValue>: public Co /** @configurationvalue{Magnum::Math::Range3D} */ template struct ConfigurationValue>: public ConfigurationValue> {}; -#ifndef DOXYGEN_GENERATING_OUTPUT +#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(__MINGW32__) extern template struct MAGNUM_EXPORT ConfigurationValue>; extern template struct MAGNUM_EXPORT ConfigurationValue>; extern template struct MAGNUM_EXPORT ConfigurationValue>; diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 54b31691d..c8e43983d 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -736,7 +736,7 @@ template struct ConfigurationValue< } }; -#ifndef DOXYGEN_GENERATING_OUTPUT +#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(__MINGW32__) /* Square matrices */ extern template struct MAGNUM_EXPORT ConfigurationValue>; extern template struct MAGNUM_EXPORT ConfigurationValue>; diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index 0c283de32..29023512d 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -1400,7 +1400,7 @@ template struct ConfigurationValue>; extern template struct MAGNUM_EXPORT ConfigurationValue>;