Problems getting started, Rez AUResources.r


So this is a bit embarrassing. I thought I’d try my first steps with some plugin code generated with Introjucer, but I can’t get it to compile on Xcode 3 or 4.

In xcode 4.3.3 I get the rez command exiting with code 3. The file it’s trying to access is there so I don’t understand what the problem is. I found this thread about the issue, but it’s already quite old and I don’t know how much of it applies to the Introjucer generated stuff:

I understand that it’s related to the location of AUresources.r in the SDK or something, but I’m still unsure about how to fix this.
Here’s the output from xcode:

failed to find AUResources/AUResources.r
/Users/me/Development/JuceProjects/ForceFeed/Builds/MacOSX/…/…/…/…/juce/modules/juce_audio_plugin_client/AU/juce_AU_Resources.r:50: ### /Applications/ - SysError 0 during open of “AUResources.r”.
Fatal Error!
/Users/me/Development/JuceProjects/ForceFeed/Builds/MacOSX/…/…/…/…/juce/modules/juce_audio_plugin_client/AU/juce_AU_Resources.r:50: ### /Applications/ - Fatal Error, can’t recover.
AUResources.r: ### /Applications/ - Since errors occurred, /Users/me/Development/JuceProjects/ForceFeed/Builds/MacOSX/DerivedData/ForceFeed/Build/Intermediates/’s resource fork was not written.
Command /Applications/ failed with exit code 3

In Xcode 3 with default SDK the rez command succeeds but then I get errors like these:

/Users/me/Development/JuceProjects/ForceFeed/Builds/MacOSX/…/…/Source/…/JuceLibraryCode/modules/juce_audio_plugin_client/…/…/…/…/…/juce/modules/juce_audio_plugin_client/…/juce_gui_basics/…/juce_graphics/colour/…/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getAlpha()’:
/Users/me/Development/JuceProjects/ForceFeed/Builds/MacOSX/…/…/Source/…/JuceLibraryCode/modules/juce_audio_plugin_client/…/…/…/…/…/juce/modules/juce_audio_plugin_client/…/juce_gui_basics/…/juce_graphics/colour/…/colour/juce_PixelFormats.h:80: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::.juce::PixelARGB::::components.juce::PixelARGB::Components::a’ to ‘juce::uint8&’



Try searching this forum for “AUResources.r”


What a PITA this apple developer stuff is! I updated to Xcode 4.4, sort of hoping it would magically fix things.

After that trying to find the CoreAudio sdk, which is nowhere to be found on the website. Ok I then figured it was in the “Audio Tools” (brilliant naming thanks), so I downloaded the 4.4 audio tools only to find out that there is no sdk in there. After searching around some more I find that the sdk is in the audio tools for 4.3. Wonderful! Installed the command line tools too since I read this in on the forum.

Now the project goes past the Rez stuff. I hit compilation errors with casting in the AU code. Let xcode fix them, it hangs. Great. Force quit.

Trying to download 4.3 again too roll back and see if that works better. All day the downloads from the apple developer site are so slow I can’t download xcode bacause it’s 1.8Gb going at a rate of 30kb aaargh :evil:

Trying xcode 3.2 again with a the most basic (default settings) AU plugin template, but I keep getting this error:

/Users/me/Development/JuceProjects/Builds/MacOSX/…/…/Source/…/JuceLibraryCode/modules/juce_audio_plugin_client/…/juce_gui_basics/…/juce_graphics/colour/…/colour/juce_PixelFormats.h:80: error: me bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::.juce::PixelARGB::::components.juce::PixelARGB::Components::a’ to ‘juce::uint8&’

Maybe someone can tell me what might be causing this so I can finally get something to compile and stop me from bashing my head into the wall. Searching this forum I find a recent response of Jules saying [quote]Ah, that’s a PPC build then. Thanks, it should be fixed now.[/quote] What is fixed where?


Ok it seems I got it working in Xcode 4.4 now.

This thread was also helpful

I had to edit to files in the AU sdk. Editing in Xcode crashes so you need to use an external editor to change the files (maybe because the files are located inside the Xcode app package?)

AUBase.h line 698:
comment out these lines to get rid of multiple base class error
// virtual OSStatus MIDIEvent( UInt32 inStatus,
// UInt32 inData1,
// UInt32 inData2,
// UInt32 inOffsetSampleFrame) { return kAudio_UnimplementedError; }

AUCarbonViewBase.cpp line 257:
add static cast
HISize originalSize = { static_cast(mBottomRight.h), static_cast(mBottomRight.v) };

Now lets see if the plugs actually load 8)