Problem with 64 bit Compile of juce_AU_wrapper in DemoPlugin

There’s just a minor error in juce_AU_Wrapper.mm - line 44 needs to look like this:

#ifdef __LP64__ #undef BUILD_AU_CARBON_UI // (not possible in a 64-bit build) #endif

that change saved us 5 errors. still 50 errors to go:

AUCarbonViewControl.cpp:54: error: ‘SetControlReference’ was not declared in this scope
AUCarbonViewControl.cpp: In member function ‘virtual void AUCarbonViewControl::Bind()’:
AUCarbonViewControl.cpp:77: error: ‘GetControlEventTarget’ was not declared in this scope
AUCarbonViewControl.cpp:95: error: ‘SetControlData’ was not declared in this scope
AUCarbonViewControl.cpp: In member function ‘virtual void AUCarbonViewControl::ParameterToControl(Float32)’:
AUCarbonViewControl.cpp:119: error: ‘GetControlKind’ was not declared in this scope
AUCarbonViewControl.cpp: In member function ‘virtual void AUCarbonViewControl::ControlToParameter()’:
AUCarbonViewControl.cpp:185: error: ‘GetControlKind’ was not declared in this scope
AUCarbonViewControl.cpp: In member function ‘virtual void AUCarbonViewControl::SetValueFract(double)’:
AUCarbonViewControl.cpp:220: error: ‘GetControl32BitMinimum’ was not declared in this scope

etc…

Yeah, obviously you’re not going to be able to compile Apple’s Carbon files. Just disable them in your project, they’re not needed if you’re not using Carbon.

Or actually, a better trick might be to hack them with an #ifndef LP64 around them, so you can leave them in your project no matter what your target architecture is.

Ok, thanks.

But how do I do if I compile as 32/64Bit Universal plugin? I can’t just uncheck this file for building in that case.

Could solve this by creating special .cpp files that actually include the other .cpp files when needed, for instance:

#ifndef __LP64__ #include "/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.cpp" #endif

Yeah, but the path might be different on different machines. The way Apple supplies those files is all a bit of a PITA, really. I’m sure they could have done them as header-only include files, or at least put them somewhere on a known include path so we could more easily reference them.

When you refer to that file in the XCode project, isn’t it all the same? Does the fact that it’s relative to the XCode folder change anything?

any fix for that yet?

In my Build Settings, under User-Defined, I added a setting EXCLUDED_SOURCE_FILE_NAMES.
Now you can set: SDK: Any SDK, Arch: Intel 64-bit, file: Carbon.cpp. The Carbon files should all match the wildcard and not be compiled.

Having the same issue with a 32/64 bit Universal AudioUnit build.

I am reluctant to hacking the sources too much, as that breaks updates to the latest tip. I am also not keen on splitting the AU build into two separate XCode projects (already separated VST and AU).

Isn’t there any more elegant solution to this?

TIA

P.S: The trick proposed by madronalabs doesn’t seem to work. Still getting the same errors.