Browse Source

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.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
86c8fdef8d
  1. 2
      src/Magnum/Math/Range.h
  2. 2
      src/Magnum/Math/RectangularMatrix.h
  3. 2
      src/Magnum/Math/Vector.h

2
src/Magnum/Math/Range.h

@ -580,7 +580,7 @@ template<class T> struct ConfigurationValue<Magnum::Math::Range2D<T>>: public Co
/** @configurationvalue{Magnum::Math::Range3D} */
template<class T> struct ConfigurationValue<Magnum::Math::Range3D<T>>: public ConfigurationValue<Magnum::Math::Range<3, T>> {};
#ifndef DOXYGEN_GENERATING_OUTPUT
#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(__MINGW32__)
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::Range<2, Magnum::Float>>;
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::Range<2, Magnum::Int>>;
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::Range<3, Magnum::Float>>;

2
src/Magnum/Math/RectangularMatrix.h

@ -736,7 +736,7 @@ template<std::size_t cols, std::size_t rows, class T> struct ConfigurationValue<
}
};
#ifndef DOXYGEN_GENERATING_OUTPUT
#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(__MINGW32__)
/* Square matrices */
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::RectangularMatrix<2, 2, Magnum::Float>>;
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::RectangularMatrix<3, 3, Magnum::Float>>;

2
src/Magnum/Math/Vector.h

@ -1400,7 +1400,7 @@ template<std::size_t size, class T> struct ConfigurationValue<Magnum::Math::Vect
}
};
#ifndef DOXYGEN_GENERATING_OUTPUT
#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(__MINGW32__)
/* Vectors */
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::Vector<2, Magnum::Float>>;
extern template struct MAGNUM_EXPORT ConfigurationValue<Magnum::Math::Vector<3, Magnum::Float>>;

Loading…
Cancel
Save