SimpleFFTExample build errors with JUCE 5.1.1

Hi all,

I’m fairly new to JUCE and am trying to build the ‘out-of-the-box’ SimpleFFTExample with JUCE 5.1.1 under Xcode and am getting several compile errors of the type:

/JUCE/examples/SimpleFFTExample/Source/SpectrogramComponent.h:40:9: Cannot initialize object parameter of type ‘juce::Timer’ with an expression of type ‘SpectrogramComponent’

Any ideas here? I imagine i am doing something dumb or perhaps the SimpleFFTExample is broken under JUCE 5.1.1? It builds without error under JUCE 5.0.2.

thanks in advance!

See this thread

I just had a JUCE-fluent friend of mine figure this out for me. Here is his solution:

  1. In the Juicer, under ‘Modules’, add the juce_dsp module. In JUCE 5.1, the FFT class has been moved here from the juce_audio_basics module.
  2. In Project Settings, change the C++ Language Standard to C++14.
  3. In SpectrogramComponent.h, change the declaration: ‘FFT forwardFFT’ to 'juce::dsp::FFT forwardFFT.
  4. In SpectrogramComponent.h, in the class constructor, change forwardFFT(fftOrder, false) to only use the first parameter.

That should do it…