This has come up for me a few times. I forget how I got around it before, but whatever the case I thought I would mention it and see if anyone knows whats going on …
- just did a fresh clone of the repo
- loaded the plugin example, compiled, no issues.
- loaded my own plugin code, copied the wrapper code from the plugin, compiled … got this:
/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUResources.r:68:0 Undefined variable (RES_ID) not allowed in expression.
I’ve gotten that one before … couldn’t remember the fix so I wrangled with my code for a bit and just couldn’t get it.
Went back to the jucePlugin example code, right clicked on AUResources.r and tried to compile … got the SAME ISSUE!!! How is that possible? It compiled fine a second ago? Read some forums and saw that this occurs of you include the file twice somehow … hmmm.
So I removed the file from the source tree in the plugin example code … recompiled … all good.
Did the same with my code … all good.
Not sure how / if AUResources.r is getting included twice, or why it compiled fine, then couldn’t compile AUResources.r when asked.
Should mention that it seems to work fine after the compilation (with AUResources.r removed that is), which also seems weird unless it actually is included in two places.