Building juceaide with gcc on MacOS

Hey all,

Just wondering if anyone is able to build juceaide using aarch64 GCC on MacOSX ?

If so, are there any additional steps you had to take to get it to work?

If i do it from a fresh install of JUCE, I get a bunch of include errors around symbols like memset, memmove etc.

If I fix these up by including the libraries it expects, I eventually start getting the errors in juce_mac_accessibility.mm and others, for example:

/JUCE/modules/juce_gui_basics/native/accessibility/juce_mac_Accessibility.mm:533:37:

[cmake]   error: 'getHandler' was not declared in this scope; did you mean
[cmake]   'PatHandle'?
[cmake] 
[cmake]     533 |                 if (auto* handler = getHandler (self))
[cmake]         |                                     ^~~~~~~~~~
[cmake]         |                                     PatHandle
[cmake]

and then, the weirdest and scariest to me are the MacOSX SDK errors, which I have loads of:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/WebKit.framework/Headers/DOMHTMLInputElement.h:42:12:
[cmake]   error: unknown property attribute 'strong'
[cmake] 
[cmake]      42 | @property (strong) DOMFileList *files WEBKIT_AVAILABLE_MAC(10_6);
[cmake]         |            ^~~~~~
[cmake] 

AppleClang will compile juceaide fine, no issues.

If anyone has an idea of what’s going on it would be much appreciated. Cheers!

That looks like GCC is unable to compile Objective-C++.

Why are you attempting to use GCC rather than AppleClang? Unless you have an extremely compelling reason I’d avoid it. You’re likely to run into lots more pain.

There’s an astronomical difference in compile times between MSVC and clang on one of our projects, so i’d like to see if it’s a clang specific issue

Why don’t you rather test a clang build on windows then and compare compile time results to MSVC there on the same build machine? Building with clang on Windows is quite well supported and also works without problems for JUCE

3 Likes