Unresolved externals & Code 6 - C++ Errors mean project can't be compiled anymore

I was working on a new C++ class for my project but didn’t get it working.
I got some great help from this forum but now I have a bigger problem.

Now, when I try to open my project UE4 says its the wrong version and asks me to rebuild it, which fails then says the project cannot be compiled.

I have read that this may be due to a broken ufunction constructor, which would make sense given the errors I’m seeing but I don’t know what I’ve done wrong and haven’t managed to fix it by searching online.

This is only my second attempt to make a C++ class in UE4 so hopefully I’m just doing something obvious.

The errors I’m getting are:


I have no idea what the last one is though.

My header file: The green line I assume means the problem is with the UFunction, when I mouse over it says “function definition not found” but I don’t know why.

The actual function itself: (eagle eyed readers will notice this function doesn’t actually calculate any angles lol)

Thanks very much

You need to put at the 2nd file UCalculateAngle:: before the function name (to tell which class that function implementation belongs to) and you need to remove the static keyword aswel.

In your CPP file try changing it to static void UCalculateAngle::CalculateAngles…

Thanks so much, I would have never figured this out.

Removing the static and adding the UCaculateAngle:: before fixed it.

Nicely picked up, I missed the static keyword