OS X 10.7 and XCode 4.1 ambiguities


Hey there guys,

I upgraded to OS X Lion yesterday and really like the new features so far.
I was just searching around a little bit and many guys said that XCode 3.2 would still work on Lion.

So I did the upgrade …
XCode 3.2 does open BUT as soon as I am opening one of my recent projects it just crashes.
Same thing when exporting a project with the Introjucer …

So I tried to open a JUCE audio plugin project in XCode 4.1
It opens without problems but I seem to get problems with some ambiguities :

"Semantic issue : Member ‘MIDI Event’ found in multiple base classes of different types"
The files “AUMidiBase.h” and “AUBase.h” are pointed out to be the bad guys.

I already changed the header include paths to the “Developer-old”-folder, but the “Apple AU Files” folder within the project still seems to point to the newer “Developer” directory.
Can anybody maybe tell me how to make the project compile??

Best ,



Ok, problem solved … you have to have XCode 3.2.6 installed to make it run in Lion.
I just had 3.2.0 installed.

As you can’t install 3.2.6 in Lion, you have to use a little trick I found on anatomicwax.tumblr.com :

Mount the image
Go to Disk Utility and convert it to a Read/Write disk image
Mount the converted disk image
In Finder, right-click on the Xcode and iOS SDK package and Show Package Contents
Inside the package, locate Contents/iPhoneSDKSL.dist and open it in your favorite text editor
Search for isDevToolsCompatible
Change 10.7 in that function to 10.8
Save the file
Run the installer package
The installer should now allow the dev tools to be installed

Worked fine for me.





I have the same problem…

I’ve finally taken the plunge and have started using XCode 4.1 (!)

And I now can’t build my Audio Units!

/Developer/Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.cpp:154: error: request for member ‘MIDIEvent’ is ambiguous
file://localhost/Developer/Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.cpp: error: Semantic Issue: Member ‘MIDIEvent’ found in multiple base classes of different types
/Developer/Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h:68: error: candidates are: virtual OSStatus AUMIDIBase::MIDIEvent(UInt32, UInt32, UInt32, UInt32)
/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h:701: error: virtual OSStatus AUBase::MIDIEvent(UInt32, UInt32, UInt32, UInt32)

My question is: how did you resolve this? :slight_smile:

Best wishes,



I’ve tried patching AUMIDIEffectBase.cpp like this… has anybody out there got any better suggestions?! The code now compiles, but…!

Thanks in advance!


static OSStatus		AUMIDIEffectBaseMIDIEvent(void *				inComponentStorage,
						UInt32					inStatus,
						UInt32					inData1,
						UInt32					inData2,
						UInt32					inOffsetSampleFrame)
	OSStatus result = noErr;
	try {
		AUMIDIEffectBase *This = static_cast<AUMIDIEffectBase *>(inComponentStorage);
		if (This == NULL) return paramErr;
		// MPC
		AUMIDIBase *lpThis = (AUMIDIBase*)This;
		//AUBase *lpThis = static_cast<AUBase*>(This);
		//result = This->MIDIEvent(inStatus, inData1, inData2, inOffsetSampleFrame);
		result = lpThis->MIDIEvent(inStatus, inData1, inData2, inOffsetSampleFrame);
	return result;


does anyone managed to get the demo plugin compiled without errors
( on osx 10.7 / lion with xcode 4.2.1 ) ?


The audio units API seems to be incomplete / broken (see Apple’s code comments and return value).

Comment the following from AUBase.h, and you should not get the errors mentioned:

	// music device/music effect methods -- incomplete
	/*! @method MIDIEvent */
	virtual OSStatus	MIDIEvent(		UInt32 						inStatus, 
										UInt32 						inData1, 
										UInt32 						inData2, 
										UInt32 						inOffsetSampleFrame) { return kAudio_UnimplementedError; }

And yes - have managed to compile on Lion, with Xcode 4.2;

Only other thing I had to do is remove AUDebugDispatcher.cpp from Project > Target > Compile Sources (see this post)