Following Tutorial: No member named 'getAvailableDevices' in 'juce::MidiInput'

I’m confused as I definitely see the function MidiInput::getAvailableDevices in Github so I know it exists. Additionally, Xcode gives me autocomplete pop-ups for MidiInput::getDevices(). Here’s a snippet of my MainComponent.cpp. Any idea why I’m getting this strange error?


#include "MainComponent.h"

//==============================================================================
MainComponent::MainComponent()
    : synthAudioSource  (keyboardState),
      keyboardComponent (keyboardState, MidiKeyboardComponent::horizontalKeyboard)
{
    addAndMakeVisible (midiInputListLabel);
    midiInputListLabel.setText ("MIDI Input:", dontSendNotification);
    midiInputListLabel.attachToComponent (&midiInputList, true);

    //auto midiInputs = MidiInput::getAvailableDevices();
    auto midiInputs = MidiInput::getAvailableDevices(); // << error here
    /// ...

Could you please share the complete compiler error? Maybe there is another error before that one which might help understand why the compiler fails.

What else can I provide to help debug this?

Well, the answer was strange/annoying. Not sure how but I ended up with a version of JUCE that didn’t have those functions. It must have been an old version I downloaded a long time ago.