juce_CoreAudio_mac does not build cleanly on macOS

/Users/runner/work/Gin/Gin/juce/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp:477:84: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
            return makeRealAudioWorkgroup (audioObjectGetProperty<os_workgroup_t> (deviceID, pa).value_or (nullptr));
/Users/runner/work/Gin/Gin/juce/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp:470:27: note: add an explicit capture of 'this' to capture '*this' by reference
        audioWorkgroup = [=]() -> AudioWorkgroup
                           , this
1 error generated.

Please supply any custom build settings you’re using (language standard, custom warnings). I’m guessing you’re using C++20 or later given the warning, but it’d be helpful to know the compiler version too.

Here are my CMake files:

It’s running on GitHub Actions macOS Latest which uses Xcode 14.2 14C18

Here is the failing run: Fix more build errors · FigBug/Gin@2dae061 · GitHub

Broke with this commit: Audio: Add AudioWorkgroup support · juce-framework/JUCE@7d9cdd3 · GitHub

Thanks, fixed here:

1 Like