From 56bb116305f349018a7bd05c77b3beb724983c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 23 Jul 2013 12:28:53 +0200 Subject: [PATCH] Fix loud linker error on mingw32. Mingw for some reasons instantiates depending template before dependent one, causing the dependent one to be instantiated twice. --- src/Math/instantiation.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Math/instantiation.cpp b/src/Math/instantiation.cpp index 99a20d760..dcaaaa601 100644 --- a/src/Math/instantiation.cpp +++ b/src/Math/instantiation.cpp @@ -52,21 +52,33 @@ template struct ConfigurationValue>; #endif +/* For some reason mingw's GCC instantiates ConfigurationValue> + (which depends on ConfigurationValue) before + these and then loudly complains about multiple definitions. WTF. */ + template struct ConfigurationValue>; template struct ConfigurationValue>; +#ifndef _WIN32 template struct ConfigurationValue>; +#endif template struct ConfigurationValue>; template struct ConfigurationValue>; +#ifndef _WIN32 template struct ConfigurationValue>; +#endif template struct ConfigurationValue>; template struct ConfigurationValue>; +#ifndef _WIN32 template struct ConfigurationValue>; +#endif #ifndef MAGNUM_TARGET_GLES template struct ConfigurationValue>; template struct ConfigurationValue>; +#ifndef _WIN32 template struct ConfigurationValue>; #endif #endif +#endif }}