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 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.
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!
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.
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.
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.
Brand new user here. Yesterday I updated my OS, installed Xcode and JUCE.
I see this thread is now a month old, and yet the latest JUCE binary (5.4.7) is still throwing this error. I don’t imagine I can downgrade from Xcode 11.4 to 11.3, given my MacOS is so new (10.15.4); Xcode 11.3.1 only supported up to Catalina 10.15.2.
How does one get the “develop branch” – is there a “nightly build” binary for this, or do I have to build JUCE from source?
It looks like the fix pointed to by @reuk just amounts to prepending “juce::” to the offending “AudioBuffer” declarations. Yea! Actually, just doing that to my existing files fixed this error, and my build works.
If you want to confirm you are on develop, you can open up one of the modules and make sure the comment header says 2020 Raw Material (and not 2017 ROLI).
I’m not sure how often people bother building the Projucer, how often, whether they have an alias from Applications to JUCE/extras/Projucer/Builds/MacOSX/build/Debug/ etc…
Unfortunately there is still a problem with JUCE and Xcode 11.4.1, if you try to build a VST3 on the Mac, even with the Developer branch.
There is code in the bundleEntry() function in juce_VST3_Wrapper.cpp that uses CFBundleRef and CFURLRef objects. These are no longer defined anywhere, probably because CoreFoundation.h was removed from juce_TargetPlatform.h in order to fix the Xcode 11.4 incompatibility.
We’re dead in the water with our project at the moment because we can’t build the VST3 version. Hopefully this is easily remedied!
Are you seeing this with a default JUCE plug-in project? I’m using Xcode 11.4.1 on macOS 10.15.4 and the AudioPluginDemo builds without issue on the develop branch.
Sorry, I haven’t tried that. But I discovered I can get around the issue by putting #include <CoreFoundation/CoreFoundation.h> back in juce_TargetPlatform.h, effectively undoing this change to juce_TargetPlatform.h: