Changes I made to latest Juce to build with our app

Hi Jules,

Thought I’d tell you which changed I had to make to Juce 1.53.17 for it to build with our pre 1.52 app.

Maybe you’d want to fold some of these back in.

juce_amalgamated.cpp : I commented this out since NSView::setAlphaValue is only supported in MacOSX 10.5 and we still build with 10.4 for the current version. Maybe make this automatic through some ifdefs?

--- /Users/gbevin/Downloads/juce/juce_amalgamated.cpp	2011-02-04 11:38:35.000000000 +0100
@@ -272441,8 +272505,8 @@
 {
 	if (! isSharedWindow)
 		[window setAlphaValue: (CGFloat) newAlpha];
-	else
-		[view setAlphaValue: (CGFloat) newAlpha];
+	//else
+	//	[view setAlphaValue: (CGFloat) newAlpha];
 }
 
 void NSViewComponentPeer::setMinimised (bool shouldBeMinimised)

juce_amalgamated.h

--- /Users/gbevin/Downloads/juce/juce_amalgamated.h	2011-02-04 11:38:35.000000000 +0100
+++ juce_amalgamated.h	2011-02-04 11:18:06.000000000 +0100
@@ -2819,7 +2819,7 @@
 	This is very handy for writing strings to std::cout, std::cerr, etc.
 */
 template <class charT, class traits>
-JUCE_API std::basic_ostream <charT, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <charT, traits>& stream, const String& stringToWrite)
+std::basic_ostream <charT, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <charT, traits>& stream, const String& stringToWrite)
 {
 	return stream << stringToWrite.toUTF8();
 }
@@ -4123,8 +4123,8 @@
 #define __JUCE_CRITICALSECTION_JUCEHEADER__
 
 #ifndef DOXYGEN
- class JUCE_API  ScopedLock;
- class JUCE_API  ScopedUnlock;
+ class ScopedLock;
+ class ScopedUnlock;
 #endif
 
 /**
@@ -6065,7 +6065,7 @@
 /*** End of inlined file: juce_OutputStream.h ***/
 
 #ifndef DOXYGEN
- class JUCE_API  DynamicObject;
+ class DynamicObject;
 #endif
 
 /**
@@ -8704,17 +8704,17 @@
 const RelativeTime operator- (const Time& time1, const Time& time2);
 
 /** Compares two Time objects. */
-bool operator== (const Time& time1, const Time& time2);
+JUCE_API bool operator== (const Time& time1, const Time& time2);
 /** Compares two Time objects. */
-bool operator!= (const Time& time1, const Time& time2);
+JUCE_API bool operator!= (const Time& time1, const Time& time2);
 /** Compares two Time objects. */
-bool operator<  (const Time& time1, const Time& time2);
+JUCE_API bool operator<  (const Time& time1, const Time& time2);
 /** Compares two Time objects. */
-bool operator<= (const Time& time1, const Time& time2);
+JUCE_API bool operator<= (const Time& time1, const Time& time2);
 /** Compares two Time objects. */
-bool operator>  (const Time& time1, const Time& time2);
+JUCE_API bool operator>  (const Time& time1, const Time& time2);
 /** Compares two Time objects. */
-bool operator>= (const Time& time1, const Time& time2);
+JUCE_API bool operator>= (const Time& time1, const Time& time2);
 
 #endif   // __JUCE_TIME_JUCEHEADER__
 /*** End of inlined file: juce_Time.h ***/
@@ -14547,7 +14547,7 @@
 /** A handy C++ wrapper that creates and deletes an NSAutoreleasePool object
 	using RAII.
 */
-class ScopedAutoReleasePool
+class JUCE_API ScopedAutoReleasePool
 {
 public:
 	ScopedAutoReleasePool();
@@ -36706,7 +36706,7 @@
 
 		@see MidiBuffer
 	*/
-	class Iterator
+	class JUCE_API Iterator
 	{
 	public:
 

Take care,

Geert

Thanks for that! I guess the other operators defined in juce_Time.cpp would also need JUCE_API added to them too… Perhaps you just didn’t call them in your code, which is why you didn’t have a problem with them.

I’m a bit puzzled about why you added JUCE_API to ScopedAutoReleasePool though - that class isn’t supposed to be used in Windows at all! If you’re using it in your own code, you should use the JUCE_AUTORELEASEPOOL macro so that it only gets invoked on the mac.

Correct, those are the only ones we called.

Ah, wasn’t aware of that macro, we’re handling this in our code now with ifdefs. I’ll clean that up then :slight_smile:

Take care,

Geert

Hi Jules,

Actually it turns out we need JUCE_API for ScopedAutoReleasePool since we leverage the JUCE_API macro to build a shared Juce library with the least possible exported symbols. We do this by setting JUCE_API to attribute ((visibility(“default”))) and compiling the rest with -fvisibility=hidden.

Take care,

Geert

Ok, well I guess there’s no harm in adding it.

Thanks!