Missing JUCE_API for var comparaison operators and WindowsPeer component factory API


#1

Hi,

(may be a duplicate… Not sure).

Some symbols seem not exported when using Juce as dynamic library (“JUCE_API” Is missing).
For now, this git-patch gives the symbols to export we need. So please, is it possible to integrate this patch ?

diff --git a/modules/juce_core/containers/juce_Variant.h b/modules/juce_core/containers/juce_Variant.h
index f5c77cb..8c3f22b 100644
--- a/modules/juce_core/containers/juce_Variant.h
+++ b/modules/juce_core/containers/juce_Variant.h
@@ -317,13 +317,13 @@ private:
 };

/** Compares the values of two var objects, using the var::equals() comparison. /
-bool operator== (const var&, const var&) noexcept;
+JUCE_API bool operator== (const var&, const var&) noexcept;
/
* Compares the values of two var objects, using the var::equals() comparison. /
-bool operator!= (const var&, const var&) noexcept;
-bool operator== (const var&, const String&);
-bool operator!= (const var&, const String&);
-bool operator== (const var&, const char
);
-bool operator!= (const var&, const char*);
+JUCE_API bool operator!= (const var&, const var&) noexcept;
+JUCE_API bool operator== (const var&, const String&);
+JUCE_API bool operator!= (const var&, const String&);
+JUCE_API bool operator== (const var&, const char*);
+JUCE_API bool operator!= (const var&, const char*);

//==============================================================================
/** This template-overloaded class can be used to convert between var and custom types. /
diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
index 253dfec…2f1e90d 100644
— a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
@@ -3040,7 +3040,7 @@ ComponentPeer
Component::createNewPeer (int styleFlags, void* parentHWND)
return new HWNDComponentPeer (*this, styleFlags, (HWND) parentHWND, false);
}

-ComponentPeer* createNonRepaintingEmbeddedWindowsPeer (Component& component, void* parentHWND)
+JUCE_API ComponentPeer* createNonRepaintingEmbeddedWindowsPeer (Component& component, void* parentHWND)
{
return new HWNDComponentPeer (component, ComponentPeer::windowIgnoresMouseClicks,
(HWND) parentHWND, true);

2.9.0.windows.1

Thanks in advance.


#2

Added to the develop branch.


#3

Ok cool! Thanks !
So, waiting for the next release :slight_smile: