BackgroundMusic icon indicating copy to clipboard operation
BackgroundMusic copied to clipboard

background music doesn't build with Xcode 14.3

Open podycust opened this issue 1 year ago • 2 comments

get errors about 'binary_function<AudioObjectPropertyAddress, AudioObjectPropertyAddress, bool>' is deprecated

podycust avatar Jun 02 '23 08:06 podycust

From https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes

std::unary_function and std::binary_function are no longer available in C++17 and C++20. They can be re-enabled by defining _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION. They are also marked as [[deprecated]] in C++11 and later. To disable deprecation warnings you have to define _LIBCPP_DISABLE_DEPRECATION_WARNINGS. Note that this disables all deprecation warnings.

So one workaround would probably be to add -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION. I'm currently running Xcode 14.2 and haven't updated to 14.3 yet so I have not tested.

jstorrs avatar Jul 27 '23 17:07 jstorrs

Turn off the "Treat Warnings as Errors" build setting and you should be good.

iljaiwas avatar Oct 05 '23 08:10 iljaiwas