2
0
Эх сурвалжийг харах

Fix MinGW compilation error.

Dave Reid 13 жил өмнө
parent
commit
f206f39c3a
1 өөрчлөгдсөн 7 нэмэгдсэн , 0 устгасан
  1. 7 0
      glm/core/setup.hpp

+ 7 - 0
glm/core/setup.hpp

@@ -536,6 +536,13 @@
 #	define GLM_ARCH GLM_ARCH_PURE
 #endif
 
+// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is
+// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems.
+// To fix, we just explicitly include intrin.h here.
+#if defined(__MINGW32__) && (GLM_ARCH != GLM_ARCH_PURE)
+#   include <intrin.h>
+#endif
+
 //#if(GLM_ARCH != GLM_ARCH_PURE)
 #if(GLM_ARCH & GLM_ARCH_AVX2)
 #	include <immintrin.h>