Expected unqualified-id errors in juce_AU_Wrapper.mm

//==============================================================================
JUCE_COMPONENT_ENTRY (JuceAU, JucePlugin_AUExportPrefix, Entry) //-- Error
#ifndef AUDIOCOMPONENT_ENTRY
 #define JUCE_DISABLE_AU_FACTORY_ENTRY 1
#endif
#if ! JUCE_DISABLE_AU_FACTORY_ENTRY  // (You might need to disable this for old Xcode 3 builds)
JUCE_FACTORY_ENTRY   (JuceAU, JucePlugin_AUExportPrefix) //-- Error
#endif
#if BUILD_AU_CARBON_UI
 JUCE_COMPONENT_ENTRY (JuceAUView, JucePlugin_AUExportPrefix, ViewEntry) //-- Error
#endif
#if ! JUCE_DISABLE_AU_FACTORY_ENTRY
 #include "CoreAudioUtilityClasses/AUPlugInDispatch.cpp"
#endif

Currently using Juce 4.2.1

I am unable to build an AU plugin because I am receiving “Expected unqualified-id” errors in these defines at the bottom of the juce_AU_Wrapper.mm file. I have no idea why. If I disable AU builds then VST plugins build fine.

I have built many projects previously using Juce 3.2 and C++99, recently I have switched to 4.2.1 and the Projucer also I now use C++11 features such as std::function and lambdas. So I had to change settings in the Projucer to support C++11, everything compiles fine except the AU Wrapper.

Any help would be appreciated , thanks.

I solved this problem. It is because naively I was using a project name which starts with a number.

I develop on windows mostly and this was never a problem, the Projucer for instance adds a prefix _ before the name of the generated AudioProcessor class. So I figured this was fine to do.

Problems start on Mac, for instance the auto generated bundle Identifier now has an illegal character “_” , I had already changed the bundle identifier so it wasn’t an issue for me, but it is a side effect of having a project name that starts with a number.

The main problem I had was with the fact that the project name was being used as a prefix in code. ie JucePlugin_AUExportPrefix was 808StudioAU (auto generated by Projucer) and of course numbers are illegal as function names in C++.

So really I should have known not to use a number at the beginning of the project name but the project is called “808 Studio” so it was natural to use that as the project name and as I say on Windows there is no problem. Projucer handles this by adding a prefix _ . So I figured it would be ok.

I think with that being the case it would be better if rather than adding the prefix the Projucer just doesn’t allow project names with numbers at the beginning. Thanks.

Sounds like a good idea to add a check to the Projucer. I’ll get right on this.