diff options
author | Eamon Nerbonne <eamon@nerbonne.org> | 2010-09-02 10:38:23 +0200 |
---|---|---|
committer | Eamon Nerbonne <eamon@nerbonne.org> | 2010-09-02 10:38:23 +0200 |
commit | d17bb02ccd0473be11e40b58f00a9af2bd4d85e6 (patch) | |
tree | aaa2cd8ff9caf8f8bd84e5e3ff6766fa9ced533f /Eigen | |
parent | e0ea25fc213a49198190ead2cdc9da3d3b59f21e (diff) |
Fixes mingw32 compile issues
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Core | 9 |
1 files changed, 8 insertions, 1 deletions
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 <intrin.h> + //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 <emmintrin.h> #include <xmmintrin.h> #ifdef EIGEN_VECTORIZE_SSE3 |