Can't open project using MySynthComponent.cpp in 4.24

I was following this tutorial on creating a simple frequency generator:

In 4.23 it works fine. I get a build.
When I nativize the Blueprints to build I get the following error:
error C2248: ‘UMySynthComponent::SetFrequency’: cannot access private member declared in class ‘UMySynthComponent’

When I upgrade to 4.24 I’m not able to open my project. I’m getting around 6 errors with the MySynthComponent.cpp
They are LNK2001 and LNK2019 errors in VS2017 15.9.6.

Any ideas how to remedy this? I don’t really understand all the synth code.

Here is the code I copied:

#include "MySynthComponent.h"

bool UMySynthComponent::Init(int32& SampleRate)
    NumChannels = 1;

    // Initialize the DSP objects

    return true;

int32 UMySynthComponent::OnGenerateAudio(float* OutAudio, int32 NumSamples)
    // Perform DSP operations here
    for (int32 Sample = 0; Sample < NumSamples; ++Sample)
        OutAudio[Sample] = Osc.Generate();

    return NumSamples;

void UMySynthComponent::SetFrequency(const float InFrequencyHz)
    // Use this protected base class method to push a lambda function which will safely execute in the audio render thread.
    SynthCommand([this, InFrequencyHz]()