diff --git a/libs/kiplatform/os/windows/environment.cpp b/libs/kiplatform/os/windows/environment.cpp
index eba890dff6..9925fe5d1a 100644
--- a/libs/kiplatform/os/windows/environment.cpp
+++ b/libs/kiplatform/os/windows/environment.cpp
@@ -30,7 +30,11 @@
 #include <Windows.h>
 #include <shellapi.h>
 #include <shlwapi.h>
-#include <shobjidl_core.h>
+#if defined( __MINGW32__ )
+    #include <shobjidl.h>
+#else
+    #include <shobjidl_core.h>
+#endif
 #include <winhttp.h>
 
 #include <Softpub.h>