Adding ANY CPP+ class to project renders it BROKEN and UNRECOVERABLE

  1. I create empty Blank project with 4.26.2, I select target platform as Windows 64 in Project Setting, I run package. All good.
  2. I add either default C++ class based on None or I enable OnlineSubsystemSteam, I restart - I get this in Editor Output log:
  3. I get the same issue when I try to build it in VS with editor closed
  4. If I try to create C++ based project instead it will fail immediately with the same error.

I clear uproject file to the state it was right after project creation and try to re-open - no dice, it is now forever stuck with thew same damned error:

2>D:/UE_4.26/Engine/Source/Developer/ToolMenus/Public/ToolMenuDelegates.h(34): error : Unable to parse delegate declaration; expected 'DECLARE_DYNAMIC_DELEGATE' but found 'DECLARE_DYNAMIC_DELEGATE_OneParam'.

So basically enabling some plugins or adding c++ classes is a destructive action in this case and there is noway to recover.

That’s not the problem… The problem is that some of your engine code looks incorrect, and those actions are causing some of the engine code to be compiled.

It sounds like you should either delete UnrealEngine and reinstall it, or I guess you could try replacing line 34 of that file with:
DECLARE_DYNAMIC_DELEGATE_OneParam(FToolMenuDynamicExecuteAction, const FToolMenuContext&, Context);

– you would need to recompile the whole engine for that, and there may be more than one such error.

This sounds like your installation is broken somehow, did you install this as a C++ project to begin with? Also “C++ class based on none”? That doesn’t make much sense in Unreal context.

– you would need to recompile the whole engine for that, and there may be more than one such error.

What possible issue was made during compilation process? I just fetched 4.26 branch and run compilation

I didn’t say there was a problem during compilation… I’m just saying the code itself doesn’t match up.

In Line 34 of Engine/Source/Developer/ToolMenus/Public/ToolMenuDelegates.h in 4.26 and 5.0 for me it is:
DECLARE_DYNAMIC_DELEGATE_OneParam(FToolMenuDynamicExecuteAction, const FToolMenuContext&, Context);

But for you it sounds like it is:
DECLARE_DYNAMIC_DELEGATE(FToolMenuDynamicExecuteAction, const FToolMenuContext&, Context);

I have no idea how it happened, I just know it is the case. So, as I stated earlier, you could try to “fix” the engine source code, or you could try to get a new clean installation.

the error is saying that it found DECLARE_DYNAMIC_DELEGATE_OneParam, Nacho.

Still, the rest of us simply don’t have that problem. What steps are you doing, specifically?

Yes. I did misread the error.