From 15f8e140f0d1d200c5b939c8ed43fac01850a055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=84=A1=E5=B8=B8?= <3142324836@qq.com> Date: Tue, 22 Oct 2024 18:48:10 +0800 Subject: [PATCH] Fixed Clang API export macros on Windows --- modules/juce_core/system/juce_StandardHeader.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 6d28cf5923d..894d84446a1 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -143,15 +143,19 @@ JUCE_END_IGNORE_WARNINGS_MSVC //============================================================================== // DLL building settings on Windows -#if JUCE_MSVC +#if JUCE_WINDOWS #ifdef JUCE_DLL_BUILD #define JUCE_API __declspec (dllexport) - #pragma warning (disable: 4251) + #ifdef _MSC_VER + #pragma warning (disable: 4251) + #endif #elif defined (JUCE_DLL) #define JUCE_API __declspec (dllimport) - #pragma warning (disable: 4251) + #ifdef _MSC_VER + #pragma warning (disable: 4251) + #endif #endif - #ifdef __INTEL_COMPILER + #if JUCE_MSVC && defined(__INTEL_COMPILER) #pragma warning (disable: 1125) // (virtual override warning) #endif #elif defined (JUCE_DLL) || defined (JUCE_DLL_BUILD) @@ -163,7 +167,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC #define JUCE_API /**< This macro is added to all JUCE public class declarations. */ #endif -#if JUCE_MSVC && JUCE_DLL_BUILD +#if JUCE_WINDOWS && JUCE_DLL_BUILD #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) public: declaration; private: #else #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) declaration;