Fixes mingw32 compile issues

This commit is contained in:
Eamon Nerbonne 2010-09-02 10:38:23 +02:00
parent e0ea25fc21
commit d17bb02ccd

View File

@ -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