You've already forked libopenshot-audio
mirror of
https://github.com/OpenShot/libopenshot-audio.git
synced 2026-03-02 08:54:01 -08:00
Fixing JUCE build errors on MinGW
This commit is contained in:
@@ -15,15 +15,16 @@ MESSAGE("--------------------------------------------------------------")
|
||||
# Failing to do so will cause your program to be terminated when a png
|
||||
# or a jpeg exception is thrown on linux or macosx.
|
||||
IF (CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
|
||||
IF (WIN32)
|
||||
SET_PROPERTY(GLOBAL PROPERTY JUCE_WINDOWS "JUCE_WINDOWS")
|
||||
SET_PROPERTY(GLOBAL PROPERTY JUCE_MINGW "JUCE_MINGW")
|
||||
ADD_DEFINITIONS(-DDONT_AUTOLINK_TO_JUCE_LIBRARY)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -march=i686 ")
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -march=i686")
|
||||
|
||||
SET(JUCE_PLATFORM_SPECIFIC_LIBRARIES
|
||||
kernel32.lib
|
||||
|
||||
@@ -87,6 +87,10 @@
|
||||
#define _WIN32_IE 0x0400
|
||||
#endif
|
||||
|
||||
#if JUCE_MINGW
|
||||
#include <basetyps.h>
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <tchar.h>
|
||||
@@ -102,9 +106,7 @@
|
||||
#include <shlwapi.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#if JUCE_MINGW
|
||||
#include <basetyps.h>
|
||||
#else
|
||||
#if ! JUCE_MINGW
|
||||
#include <crtdbg.h>
|
||||
#include <comutil.h>
|
||||
#endif
|
||||
|
||||
@@ -132,12 +132,11 @@ public:
|
||||
{
|
||||
#if ! JUCE_MINGW
|
||||
if (refId == __uuidof (ComClass)) { AddRef(); *result = dynamic_cast <ComClass*> (this); return S_OK; }
|
||||
if (refId == IID_IUnknown) { AddRef(); *result = dynamic_cast <IUnknown*> (this); return S_OK; }
|
||||
#else
|
||||
jassertfalse; // need to find a mingw equivalent of __uuidof to make this possible
|
||||
#endif
|
||||
|
||||
if (refId == IID_IUnknown) { AddRef(); *result = dynamic_cast <IUnknown*> (this); return S_OK; }
|
||||
|
||||
*result = 0;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ namespace NumberToStringConverters
|
||||
else
|
||||
{
|
||||
// Use a locale-free sprintf where possible (not available on linux AFAICT)
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_WINDOWS && ! JUCE_MINGW
|
||||
len = (size_t) _sprintf_l (buffer, "%.9g", _create_locale (LC_NUMERIC, "C"), n);
|
||||
#elif JUCE_MAC || JUCE_IOS
|
||||
len = (size_t) sprintf_l (buffer, nullptr, "%.9g", n);
|
||||
|
||||
@@ -54,7 +54,12 @@ void* getUser32Function (const char* functionName) // (NB: this function also us
|
||||
HMODULE user32Mod = GetModuleHandleA ("user32.dll");
|
||||
jassert (user32Mod != 0);
|
||||
|
||||
return static_cast <void*> (GetProcAddress (user32Mod, functionName));
|
||||
#if ! JUCE_MINGW
|
||||
return static_cast <void*> (GetProcAddress (user32Mod, functionName));
|
||||
#else
|
||||
jassertfalse; // need to find a mingw equivalent
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user