From 8a42c727c18400b44d689fbe2a79b507e19a2c89 Mon Sep 17 00:00:00 2001 From: William JCM Date: Tue, 14 Jan 2020 22:03:46 +0100 Subject: [PATCH] Fix one particular kind of linker errors on MingGW Clang. The existing ifdefs apparently were just to work around something in MinGW GCC. MSVC, Clang-cl and MinGW Clang don't need these. --- src/Magnum/Animation/Player.h | 2 +- src/Magnum/Audio/Listener.h | 2 +- src/Magnum/Audio/Playable.h | 2 +- src/Magnum/Audio/PlayableGroup.h | 2 +- src/Magnum/MeshTools/CompressIndices.h | 2 +- src/Magnum/SceneGraph/AbstractFeature.h | 2 +- src/Magnum/SceneGraph/AbstractObject.h | 2 +- src/Magnum/SceneGraph/AbstractTransformation.h | 2 +- src/Magnum/SceneGraph/Animable.h | 2 +- src/Magnum/SceneGraph/AnimableGroup.h | 2 +- src/Magnum/SceneGraph/Camera.h | 2 +- src/Magnum/SceneGraph/Drawable.h | 2 +- src/Magnum/SceneGraph/DualComplexTransformation.h | 2 +- src/Magnum/SceneGraph/DualQuaternionTransformation.h | 2 +- src/Magnum/SceneGraph/FeatureGroup.h | 2 +- src/Magnum/SceneGraph/MatrixTransformation2D.h | 2 +- src/Magnum/SceneGraph/MatrixTransformation3D.h | 2 +- src/Magnum/SceneGraph/RigidMatrixTransformation2D.h | 2 +- src/Magnum/SceneGraph/RigidMatrixTransformation3D.h | 2 +- .../SceneGraph/TranslationRotationScalingTransformation2D.h | 2 +- .../SceneGraph/TranslationRotationScalingTransformation3D.h | 2 +- src/Magnum/SceneGraph/TranslationTransformation.h | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Magnum/Animation/Player.h b/src/Magnum/Animation/Player.h index 95a1fe859..0b28b7249 100644 --- a/src/Magnum/Animation/Player.h +++ b/src/Magnum/Animation/Player.h @@ -872,7 +872,7 @@ template template Player; extern template class MAGNUM_EXPORT Player; #endif diff --git a/src/Magnum/Audio/Listener.h b/src/Magnum/Audio/Listener.h index 0cba88f39..5699ee3d1 100644 --- a/src/Magnum/Audio/Listener.h +++ b/src/Magnum/Audio/Listener.h @@ -157,7 +157,7 @@ typedef Listener<2> Listener2D; */ typedef Listener<3> Listener3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_AUDIO_EXPORT Listener<2>; extern template class MAGNUM_AUDIO_EXPORT Listener<3>; #endif diff --git a/src/Magnum/Audio/Playable.h b/src/Magnum/Audio/Playable.h index 2cc3ce46d..fbadfce6c 100644 --- a/src/Magnum/Audio/Playable.h +++ b/src/Magnum/Audio/Playable.h @@ -155,7 +155,7 @@ typedef Playable<2> Playable2D; */ typedef Playable<3> Playable3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_AUDIO_EXPORT Playable<2>; extern template class MAGNUM_AUDIO_EXPORT Playable<3>; #endif diff --git a/src/Magnum/Audio/PlayableGroup.h b/src/Magnum/Audio/PlayableGroup.h index 26ed53266..86b4c63f5 100644 --- a/src/Magnum/Audio/PlayableGroup.h +++ b/src/Magnum/Audio/PlayableGroup.h @@ -128,7 +128,7 @@ typedef PlayableGroup<2> PlayableGroup2D; */ typedef PlayableGroup<3> PlayableGroup3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_AUDIO_EXPORT PlayableGroup<2>; extern template class MAGNUM_AUDIO_EXPORT PlayableGroup<3>; #endif diff --git a/src/Magnum/MeshTools/CompressIndices.h b/src/Magnum/MeshTools/CompressIndices.h index 0911a3ad0..8aa34faab 100644 --- a/src/Magnum/MeshTools/CompressIndices.h +++ b/src/Magnum/MeshTools/CompressIndices.h @@ -196,7 +196,7 @@ Example usage: */ template CORRADE_DEPRECATED("use compressIndices(const Containers::StridedArrayView1D&, MeshIndexType, Long) instead") MAGNUM_MESHTOOLS_EXPORT Containers::Array compressIndicesAs(const std::vector& indices); -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template MAGNUM_MESHTOOLS_EXPORT Containers::Array compressIndicesAs(const std::vector&); extern template MAGNUM_MESHTOOLS_EXPORT Containers::Array compressIndicesAs(const std::vector&); extern template MAGNUM_MESHTOOLS_EXPORT Containers::Array compressIndicesAs(const std::vector&); diff --git a/src/Magnum/SceneGraph/AbstractFeature.h b/src/Magnum/SceneGraph/AbstractFeature.h index 2430da15e..c3ba8e90f 100644 --- a/src/Magnum/SceneGraph/AbstractFeature.h +++ b/src/Magnum/SceneGraph/AbstractFeature.h @@ -316,7 +316,7 @@ template using AbstractBasicFeature3D = AbstractFeature<3, T>; */ typedef AbstractBasicFeature3D AbstractFeature3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index 8de2fd8a4..369ecc2e9 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -313,7 +313,7 @@ typedef AbstractBasicObject3D AbstractObject3D; typedef AbstractObject<3, Float> AbstractObject3D; #endif -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractObject<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractObject<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/AbstractTransformation.h b/src/Magnum/SceneGraph/AbstractTransformation.h index bf8d72121..ecc2c780d 100644 --- a/src/Magnum/SceneGraph/AbstractTransformation.h +++ b/src/Magnum/SceneGraph/AbstractTransformation.h @@ -122,7 +122,7 @@ template using AbstractBasicTransformation3D = AbstractTransformation<3 */ typedef AbstractBasicTransformation3D AbstractTransformation3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractTransformation<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractTransformation<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/Animable.h b/src/Magnum/SceneGraph/Animable.h index d8e918e71..7b60c9ae5 100644 --- a/src/Magnum/SceneGraph/Animable.h +++ b/src/Magnum/SceneGraph/Animable.h @@ -339,7 +339,7 @@ template using BasicAnimable3D = Animable<3, T>; */ typedef BasicAnimable3D Animable3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT Animable<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT Animable<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/AnimableGroup.h b/src/Magnum/SceneGraph/AnimableGroup.h index 0582643c2..afc105f7a 100644 --- a/src/Magnum/SceneGraph/AnimableGroup.h +++ b/src/Magnum/SceneGraph/AnimableGroup.h @@ -109,7 +109,7 @@ template using BasicAnimableGroup3D = AnimableGroup<3, T>; */ typedef BasicAnimableGroup3D AnimableGroup3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/Camera.h b/src/Magnum/SceneGraph/Camera.h index 820ffc4f4..ef57e1018 100644 --- a/src/Magnum/SceneGraph/Camera.h +++ b/src/Magnum/SceneGraph/Camera.h @@ -266,7 +266,7 @@ template using BasicCamera3D = Camera<3, T>; */ typedef BasicCamera3D Camera3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT Camera<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT Camera<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/Drawable.h b/src/Magnum/SceneGraph/Drawable.h index 9a86f5232..0c4ae0c6f 100644 --- a/src/Magnum/SceneGraph/Drawable.h +++ b/src/Magnum/SceneGraph/Drawable.h @@ -272,7 +272,7 @@ template using BasicDrawableGroup3D = DrawableGroup<3, T>; */ typedef BasicDrawableGroup3D DrawableGroup3D; -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT Drawable<2, Float>; extern template class MAGNUM_SCENEGRAPH_EXPORT Drawable<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/DualComplexTransformation.h b/src/Magnum/SceneGraph/DualComplexTransformation.h index 5344c9dd4..d1ca904c2 100644 --- a/src/Magnum/SceneGraph/DualComplexTransformation.h +++ b/src/Magnum/SceneGraph/DualComplexTransformation.h @@ -258,7 +258,7 @@ template struct Transformation> { } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif diff --git a/src/Magnum/SceneGraph/DualQuaternionTransformation.h b/src/Magnum/SceneGraph/DualQuaternionTransformation.h index e06cf0319..7a319ba1f 100644 --- a/src/Magnum/SceneGraph/DualQuaternionTransformation.h +++ b/src/Magnum/SceneGraph/DualQuaternionTransformation.h @@ -288,7 +288,7 @@ template struct Transformation> { } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif diff --git a/src/Magnum/SceneGraph/FeatureGroup.h b/src/Magnum/SceneGraph/FeatureGroup.h index b519e4985..50dd057b2 100644 --- a/src/Magnum/SceneGraph/FeatureGroup.h +++ b/src/Magnum/SceneGraph/FeatureGroup.h @@ -197,7 +197,7 @@ template FeatureGroup; extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeatureGroup<3, Float>; #endif diff --git a/src/Magnum/SceneGraph/MatrixTransformation2D.h b/src/Magnum/SceneGraph/MatrixTransformation2D.h index 7f36e745f..0ab9f931e 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation2D.h @@ -261,7 +261,7 @@ template struct Transformation> { } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT BasicMatrixTransformation2D; extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif diff --git a/src/Magnum/SceneGraph/MatrixTransformation3D.h b/src/Magnum/SceneGraph/MatrixTransformation3D.h index 4229b15f9..b6345ca06 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation3D.h @@ -347,7 +347,7 @@ template struct Transformation> { } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT BasicMatrixTransformation3D; extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h index 6cfa90870..687df4caf 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h @@ -281,7 +281,7 @@ template struct Transformation> { } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT BasicRigidMatrixTransformation2D; extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h index 17edaed49..0f99a0bb2 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h @@ -366,7 +366,7 @@ template struct Transformation> { } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT BasicRigidMatrixTransformation3D; extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif diff --git a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h index 2eb2c21a0..648ed209f 100644 --- a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h +++ b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h @@ -321,7 +321,7 @@ template struct Transformation>; #endif diff --git a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h index 3d08e4e3e..c6e5a7210 100644 --- a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h +++ b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h @@ -410,7 +410,7 @@ template struct Transformation>; #endif diff --git a/src/Magnum/SceneGraph/TranslationTransformation.h b/src/Magnum/SceneGraph/TranslationTransformation.h index f5c3029b1..00d737f8a 100644 --- a/src/Magnum/SceneGraph/TranslationTransformation.h +++ b/src/Magnum/SceneGraph/TranslationTransformation.h @@ -195,7 +195,7 @@ template struct Transfor } -#if defined(CORRADE_TARGET_WINDOWS) && !defined(__MINGW32__) +#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; extern template class MAGNUM_SCENEGRAPH_EXPORT Object>; #endif