diff --git a/Eigen/Core b/Eigen/Core index 5260ce7e8..56005f836 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -93,7 +93,14 @@ #endif // include files - + #if (defined __GNUC__) && (defined __MINGW32__) + #include + //including intrin.h works around a MINGW bug http://sourceforge.net/tracker/?func=detail&atid=102435&aid=2962480&group_id=2435 + //in essence, intrin.h is included by windows.h and also declares intrinsics (just as emmintrin.h etc. below do). However, + //intrin.h uses an extern "C" declaration, and g++ thus complains of duplicate declarations with conflicting linkage. The linkage for intrinsics + //doesn't matter, but at that stage the compiler doesn't know; so, to avoid compile errors when windows.h is included after Eigen/Core, + //include intrin here. + #endif #include #include #ifdef EIGEN_VECTORIZE_SSE3