Hi all, I’m using Xcode 11.5 on Catalina 10.15.5 with Juce v6.0.1, when attempting to compile a simple gain slider audio plugin I’m getting the error “No member named ‘Gain’ in ‘juce::AudioProcessor’”, I’ve asked around and looked at other solutions and so far nothing has worked.
Hopefully there is someone in here that has had to deal with a similar issue and has a solution, thanks in advance.
Hi @Thequeensalizard , from not seeing the code, I suspect that you are accidentally using “Gain”, where the member should be “gain”. Members are case sensitive. If that does not solve your problem, please share the code you are working on and I can give it a look.
Hi @jamand , altering the case of the member name doesn’t seem to make a difference, I’ve included a link to the git repo here for you to look at if you’d be so kind.
So your problem is that processor is a reference to a juce::AudioProcessor which does not contain a member called gain. You’re already initialising a variable of type FaderAudioProcessor& in your constructor which you’ve called audioProcessor, therefore change this…
Yes, C++ is really nit picky.
Remember that was where I tried to steer your attention on discord, when I asked what type processor actually is
It’s important to keep in mind, you can always assign to a pointer or reference of a more general type, but not to a more specific type. To achieve that you need to look into dynamic_cast, but that comes at a cost and can fail…