How to set button image in c++?

This is how I tried to do this:

But it gives me an error:
MainMenuWidget.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: struct FButtonStyle & __cdecl FButtonStyle::SetNormal(struct FSlateBrush const &)” (_imp?SetNormal@FButtonStyle@@QEAAAEAU1@AEBUFSlateBrush@@@Z) referenced in function “protected: virtual void __cdecl UMainMenuWidget::NativePreConstruct(void)” (?NativePreConstruct@UMainMenuWidget@@MEAAXXZ)

Help me please, I am not good in c++.

From the look of things, I had a similar problem when I was converting my Blueprint prototyping to C++ code, namely button style.
FButtonStyle structure “lives” inside the Slate module, so you need to include that module in the build file.

Navigate to “ProjectName.Build.cs” in Visual Studio, and you’ll find a line of code that looks like this:

PublicDependencyModuleNames.AddRange(new string[] { "GameplayAbilities", "GameplayTags", "GameplayTasks", "AIModule", "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "UMG" });

Add this line below the one I mentioned:

PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

You can find extra info here:
Including Slate