To compile Audio Units with the OWLSim:
1). Download the Core Audio Utility Classes from:
2). Move the CoreAudio folder to:
3). Create a symlink to:
Be sure to use the Juce forums if you get stuck – there’s a lot of info. there
about getting AU’s to compile:
4). Make an new group folder in your XCode project called something like AU
wrapper folder, and put this in your Juce Library Code group. Add the necessary
CA files (you don’t need all of these to compile AU’s successfully – look at the juce
demo plugin project).
(It’s also a good idea to add these files in the Introjucer project in case the
project has to be rebuilt for any reason).
5). Make sure you are building against these frameworks (these can also be added
in the Introjucer under Extra Frameworks):
AudioToolbox, AudioUnit, CoreAudio, CoreAudioKit
6). Set Header Search Paths in XCode:
7). Set Other Rez Flags in XCode:
Rez errors that you might encounter:
Rez exit code 2 : in Build phases only have the juce AUResources.r file – delete
the other one!
Rez exit code 3 : Make sure that the Other Rez flags are set correctly.
Thanks for the pointers. Writing stuff down for the benefit of anyone else who might try to do the same.
I’d done 1,2 and 3.
5 – good point, AudioUnit and CoreAudioKit weren’t included in Target->OwlSim->Build Phases->Link Binary With Libraries so I added them (did “Add Other…”->navigate to /System/Library/Frameworks/ and add the folders).
6 – I had /Library/Developer/CoreAudio/** (recursive) instead of the three CoreAudio directories, I guess that’s just a different way of linking to the same thing.
7 – yep, had those flags set.
So, got rid of the previous error, now just getting Rez error 3, but still working on it (just about to look at point 4…).
failed to find AudioUnit/AudioUnit.r/Users/tom/Documents/projects/owl-pedal/OwlSim/Builds/MacOSX/../../modules/juce_audio_plugin_client/AU/juce_AU_Resources.r:27: ### /Applications/Xcode.app/Contents/Developer/usr/bin/Rez - SysError 2 during open of "AudioUnit/AudioUnit.r".Fatal Error! /Users/tom/Documents/projects/owl-pedal/OwlSim/Builds/MacOSX/../../modules/juce_audio_plugin_client/AU/juce_AU_Resources.r:27: ### /Applications/Xcode.app/Contents/Developer/usr/bin/Rez - Fatal Error, can't recover. /Users/tom/Documents/projects/owl-pedal/OwlSim/Builds/MacOSX/../../modules/juce_audio_plugin_client/AU/juce_AU_Resources.r: ### /Applications/Xcode.app/Contents/Developer/usr/bin/Rez - Since errors occurred, /Users/tom/Library/Developer/Xcode/DerivedData/OwlSim-cpkooekallczofdinjczuavgckmp/Build/Intermediates/OwlSim.build/Debug/OwlSim.build/ResourceManagerResources/Objects/juce_AU_Resources.rsrc's resource fork was not written. Command /Applications/Xcode.app/Contents/Developer/usr/bin/Rez failed with exit code 3
I’ve been hacking around to get this working and can’t offer you a definitive explanation of why, but if you create this folder with the necessary CA files in and move it to the Juce Library Code folder it should help (I’ve copied this setup from the juce demo plugin project downloaded with juce – you can look in this to see which CA files you need).
Hope this helps, you’re nearly there.
Hi, I’m having the same problems as madwort and think its step 4 that i need to complete but I’m not sure what files to include , and I haven’t been able to find the juce demo plugin. Any chance you could list the files I need to add to this folder?
The juce demo plugin is included with the juce download (it’s not part of OWLSim). Here is a list of the Core Audio files you need:
Ok, added a group with that list of files (double-checked against the juce AU demo project). Now get a new bunch of errors that look like this:
Check dependencies warning: The specified SDK “Current OS X” does not appear to have all of the necessary headers installed. Update your project to use a built-in SDK (“Latest OS X” is recommended) or install the system headers (included with the “Command Line Tools” package) from the “Downloads” pane in the Xcode preferences. In file included from /Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.cpp:47: In file included from /Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.h:50: /Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.h:50:10: fatal error: 'map' file not found #include <map> In file included from /Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp:47: /Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h:50:10: fatal error: 'TargetConditionals.h' file not found #include <TargetConditionals.h> In file included from /Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.cpp:47: /Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h:50:10: fatal error: 'new' file not found #include <new> In file included from /Library/Developer/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.cpp:47: /Library/Developer/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.h:50:10: fatal error: 'vector' file not found #include <vector>
(for reference, I’m on OS X 10.8.4 and XCode 4.6.2).
Changing various project settings in favour of ‘this version of os x’ seems to have got that down to just one “#include <new>” error, but still not quite there…
It seems like you are missing some standard header files like vector and map.
Did you do these:
Update your project to use a built-in SDK (“Latest OS X” is recommended) or install the system headers (included with the “Command Line Tools” package) from the “Downloads” pane in the Xcode preferences.
I played around with the SDK settings, just waiting for the Command Line Tools package to download…
Ok, Command Line Tools package installed, now I get “Rez failed with exit code 2”. In your post you said “in Build phases only have the juce AUResources.r file – delete the other one!” – which one did you mean? I now have “Juce Library Code/Juce AU Wrapper/AUResources.r” and “Juce Library Code/juce_AUResources.r”.
Delete “Juce Library Code/Juce AU Wrapper/AUResources.r”, leaving “Juce Library Code/juce_AUResources.r” in place
Ok, deleted “Juce Library Code/Juce AU Wrapper/AUResources.r”, now I get the 82 linker errors that I got originally! Bah!
Can you post the error message?
OK – I would recommend to try building the project from the introjucer file (OWLSim.jucer) – you’ll have to add the CA files here again, but it does makes life easier.
I added the files you listed and some other ones xcode said were missing. Im now getting the error AUPlugInDispatch.cpp not found, even though it is in the AU wrapper folder. Any ideas on how to fix this? Thanks
You must be logged in to reply to this topic.