Forums > Gen

Building AU with delay object fails

July 11, 2013 | 5:32 am

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


July 11, 2013 | 10:30 am

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

July 11, 2013 | 12:18 pm

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.

July 14, 2013 | 7:14 am

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.

July 15, 2013 | 2:23 am

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

July 15, 2013 | 8:28 am

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.

July 15, 2013 | 9:47 am

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.

July 16, 2013 | 12:05 pm

That did the trick, thanks Wesley.

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > Gen