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

<code>

– Pasted Max Patch, click to expand. –

</code>

Attachments:
  1. error
#255643
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.

#255665
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.

#255675
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.

#255976
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?

#256031
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.

#256089
Jul 15, 2013 at 9:47am

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

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

#256096
Jul 16, 2013 at 12:05pm

That did the trick, thanks Wesley.

#256195

You must be logged in to reply to this topic.