Building AU with delay object fails

Jul 11, 2013 at 5:32am

Building AU with delay object fails

A simple delay creates the following error when building:
Must use ‘struct’ tag to refer to type ‘Delay’ in this scope


– Pasted Max Patch, click to expand. –


  1. error
Jul 11, 2013 at 10:30am

Try to rename “param Delay” to “param Delaytime”. “Delay” conflicts with the internal object name in the .cpp code.

Jul 11, 2013 at 12:18pm

Thanks for the suggestion. But after renaming the issue persists. Actually, I came across this error using another gen patch where the parameter Delay doesn’t exist. It seems inherent in the Delay method. And sure, using the parameter Dalay isn’t really a good idea.

Jul 14, 2013 at 7:14am

Found it. My suspicion that there is a naming conflict was right. “Delay” is used by Apple in CoreServices.framework/Frameworks/CarbonCore.framework/Headers/OSUtils.h. Found this after performing “Product->Perform Action->Preprocess “gen_exported.cpp”". After renaming “Delay” to e.g. “GENDelay” at all locatons the project builds, but: the product shows only up as a folder and auval and any audio app I tried don’t see it as plugin. Hm.

Jul 15, 2013 at 2:23am

Thanks for getting to the bottom of this. Is my understanding correct that this must be addressed by Cycling?

Jul 15, 2013 at 8:28am

Yes, I think so. Or maybe Cycling is ahead of our time since “Delay” is in the framework marked as “__OSX_AVAILABLE_BUT_DEPRECATED”. This means in a future release of OSX it will be gone.

Jul 15, 2013 at 9:47am

I was able to fix compilation by changing:
Delay m_delay_1;
struct Delay m_delay_1;

For some reason, only the AU project exhibits this error.

Jul 16, 2013 at 12:05pm

That did the trick, thanks Wesley.


You must be logged in to reply to this topic.