29

Been banging my head agains the wall for awhile now. My Xcode project went a little haywire while refactoring, and refused to build. I've squashed all the other errors, except one last linktime error:

Framework not found AudioUnit

I have the AudioUnit headers, the AudioUnit.framework is included in my project as it was before (Targets > Get Info > General > Linked Libraries > + ), but I cannot figure out why it does not work now. AudioToolbox.framework is also included.

alexbw
  • 2,028
  • 2
  • 21
  • 25

3 Answers3

95

Remove AudioUnit.framework and add CoreAudio.framework

Thomas Zoechling
  • 34,177
  • 3
  • 81
  • 112
  • 5
    And make sure that your import for CoreAudio is #import – TechZen Nov 18 '09 at 16:23
  • 10
    To those arriving from Google: You may also find it necessary to add AudioToolkit.framework instead of or in addition to CoreAudio.framework. – warrenm Mar 04 '11 at 21:49
  • Out of curiosity, what is the difference between those two frameworks? Is one legacy? – P i Jun 30 '11 at 10:07
  • +1 because it worked for me as well. Not sure what the root issue is. – Cliff Nov 29 '11 at 17:17
  • For me, this didn't work. Same idea with AudioToolkit.framework. As a matter of fact, if I remove any of these frameworks I get many linking errors. But if I have the three of them, I get a single linking error 'Framework not found AudioUnit'. Any idea what I'm doing wrong? Anyone understand why this error shows up in the first place? – Emmanuel Apr 19 '12 at 15:04
  • try this @Emmanuel. I added all three frameworks. then removed audiounits from the list within link binaries with libraries (however this does not remove it from the project navigator view, thats fine leave it there) then leave both import statment #import #import – owen gerig May 11 '12 at 16:13
9

Helped for me: removing AudioUnit.framework, then adding AudioToolbox.framework, Clean, Build

In my case compiler lies about AudioUnit, in fact for project was required only AudioToolbox.framework.

Wert1go
  • 297
  • 5
  • 10
1

I had already tried swapping out all available audio frameworks (AudioToolbox, CoreAudio and AudioUnit) and no configuration worked. Something funky with Xcode was going on.

I reinstalled Xcode and migrated the code to a new project. Now it builds fine with the exact same frameworks as I had before. A frustrating solution, but a working one nonetheless.

alexbw
  • 2,028
  • 2
  • 21
  • 25