JUCE is busted in Xcode 11.4

I don’t think it’s ever been disabled.

I just tried doing a default audio plugin project on mac os x and there isn’t a switch to disable it in ProJucer. Adding “DONT_SET_USING_JUCE_NAMESPACE=1” to the preprocessor macros does disable the using namespace juce;, but then the project won’t build anymore as it can’t find many types. The library code itself seems fine, but the template project definitely can’t handle it.

that was it - i do have a custom StandaloneFilterWindow, i updated it with the changes from 3520f6c4f6dece4eb7b09ed80c021f064b3563f7 and it works now, sorry for the noise.

Is this fix backwards compatible? If I update JUCE to develop, what’s the oldest Xcode that will still build it?

Building should (still) be supported on macOS 10.11 and Xcode 7.3.1.


On a side note, “Rectangle” has been an ambiguous clash with “Windows.h” since I’ve been using Juce, 2 years or so ago.

Is the clash in JUCE itself? If not, what I said earlier applies here: There’s not much JUCE can to do to prevent ambiguities between juce::Rectangle and global Rectangle if windows.h is included in user code (JUCE is already doing the right thing by namespacing Rectangle). Commonly-used identifiers like ‘Point’ and ‘Rectangle’ should never be declared in the global namespace for exactly this reason.

On a side note, “Rectangle” has been an ambiguous clash with “Windows.h” since I’ve been using Juce, 2 years or so ago.

You can also use #define NOGDI before you include Windows.h to get rid of Rectangle if you don’t need he GDI stuff.


Hi! Any info on how to fix this problem? Seems to occur only since upgrading xcode to 11.4. I’m still confused after reading through this thread. Cheers!

Edit 1

What does this mean?

Make sure you’re using an up-to-date version of JUCE, ideally the current state of the develop branch. I think that master currently won’t build with Xcode 11.4.

Thanks for the reply. I forgot to mention that I did all that.

Is the issue in your code, or in the JUCE source? Are you including any apple framework headers directly, or are you relying entirely on JuceHeader.h?

Downgraded to xcode 11.3.1 and everything works fine.

The issue with 11.4 seems to be in the JUCE source:

project/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm:9:10: In file included from project/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm:9:

project/JUCE_WASM/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm:27:10: In file included from ../../JUCE_WASM/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm:27:

Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h:147:29: Candidate found by name lookup is 'AudioBuffer'

project/JUCE_WASM/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h:33:7: Candidate found by name lookup is 'juce::AudioBuffer'

What would an apple framework header look like? I have not really done any C or C++, so I’m not sure where to look. In most of my source files, I’m either referencing my other source files, JuceHeader.h or some native libs.

JuceHeader.h includes are:

#include "../../JuceLibraryCode/JuceHeader.h"
#include "JuceHeader.h"

Other includes are:

#include <memory>
#include <math.h>

Let me know if you need more info.


Thanks for the extra info. Can you paste the very beginning of that error, so that I can see on which file/line the problem is happening?

Also, did you definitely resave your project in the Projucer after updating your JUCE version to develop?

Oh yeah sorry about that. project/JUCE_WASM/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm:1802:24: Reference to 'AudioBuffer' is ambiguous

So yes, I saved the project by clicking on the XCode “Save and open in IDE” icon in Projucer. Just to be sure, I’m using Projucer version 5.4.7 with Build date of 1 April 2020.

On develop, line 1802 of that file is a closing curly brace.
However, there was a reference to AudioBuffer on line 1802 a few months ago. Can you double check that your copy of juce is up-to-date, as I think that’s the most likely cause of the problem.