From 2f80d64056ec73f18bfe071822c3724d3881b945 Mon Sep 17 00:00:00 2001 From: Jan Van Bruggen Date: Mon, 31 Jan 2022 11:17:27 -0700 Subject: [PATCH] Link macOS with AudioUnit, CoreAudio, IOKit frameworks AudioUnit & CoreAudio are necessary to get [Bevy](https://docs.rs/bevy/latest/bevy/)'s "hello world" example working inside a Roc platform. IOKit is necessary to get [Bevy](https://docs.rs/bevy/latest/bevy/)'s "breakout" example working inside a Roc platform. Credit to @hafiz for discovering this solution. --- compiler/build/src/link.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/build/src/link.rs b/compiler/build/src/link.rs index 13f8f00a65e..b3d5e520626 100644 --- a/compiler/build/src/link.rs +++ b/compiler/build/src/link.rs @@ -861,10 +861,16 @@ fn link_macos( "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/", // These frameworks are needed for GUI examples to work "-framework", + "AudioUnit", + "-framework", "Cocoa", "-framework", + "CoreAudio", + "-framework", "CoreVideo", "-framework", + "IOKit", + "-framework", "Metal", "-framework", "QuartzCore",