Hey Jules,
I’m trying to compile Juce, latest tip, under MingW (mingw32 and mingw64), and there are minor issues.
here’s a patch for juce-core module:
[code]diff --git a/modules/juce_core/memory/juce_Memory.h b/modules/juce_core/memory/juce_Memory.h
index 314cfa8…3923657 100644
— a/modules/juce_core/memory/juce_Memory.h
+++ b/modules/juce_core/memory/juce_Memory.h
@@ -27,12 +27,6 @@
#define JUCE_MEMORY_JUCEHEADER
//==============================================================================
-#if JUCE_MINGW
- /** This allocator is not defined in mingw gcc. */
-
#define alloca __builtin_alloca
-#endif
-//==============================================================================
/** Fills a block of memory with zeros. /
inline void zeromem (void memory, size_t numBytes) noexcept { memset (memory, 0, numBytes); }
diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h
index 43451bb…074506f 100644
— a/modules/juce_core/native/juce_BasicNativeHeaders.h
+++ b/modules/juce_core/native/juce_BasicNativeHeaders.h
@@ -83,7 +83,11 @@
#define STRICT 1
#define WIN32_LEAN_AND_MEAN 1
- #define _WIN32_WINNT 0x0600
-
#if JUCE_MINGW
-
#define _WIN32_WINNT 0x0501
-
#else
-
#define _WIN32_WINNT 0x0600
-
#endif
#define _UNICODE 1
#define UNICODE 1
#ifndef _WIN32_IE
diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h
index 919621a…d5211c2 100644
— a/modules/juce_core/system/juce_TargetPlatform.h
+++ b/modules/juce_core/system/juce_TargetPlatform.h
@@ -81,6 +81,11 @@#ifdef MINGW32
#define JUCE_MINGW 1 -
#ifdef MINGW64
-
#define JUCE_64BIT 1
-
#else
-
#define JUCE_32BIT 1
-
#endif
#endif
/** If defined, this indicates that the processor is little-endian. */
[/code]
fixes:
- ‘alloca’ is now available
- JUCE_32/64BIT was not being defined for mingw
I’ve set ‘_WIN32_WINNT’ as ‘0x0501’ (mingw fails to build otherwise)
EDIT: forgot this change:
[code]diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h
index b436f52…7608446 100644
— a/modules/juce_core/maths/juce_MathsFunctions.h
+++ b/modules/juce_core/maths/juce_MathsFunctions.h
@@ -285,7 +285,7 @@ inline int numElementsInArray (Type (&array)[N])
template
inline Type juce_hypot (Type a, Type b) noexcept
{
- #if JUCE_WINDOWS
-
#if JUCE_WINDOWS && ! JUCE_MINGW
return static_cast (_hypot (a, b));
#else
return static_cast (hypot (a, b));
[/code]
I’ll try to build the other modules and we’ll write here patches as needed