Newbie c++ problem

I have this code for my game instance c++ class and i get unresolved external symbols error:

.h file:

#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include <Blueprint/UserWidget.h>
#include <Engine/GameViewportClient.h>
#include "MyGameInstance.generated.h"

UCLASS()
class MYPROJECT_API UMyGameInstance : public UGameInstance
{
	GENERATED_BODY()
	
public:
	UFUNCTION(BlueprintCallable, Category = "Da")
		void ShowLoadingScreene(UUserWidget *Widget, int32 a);
};

.cpp file:

#include "MyGameInstance.h"
#include <Blueprint/UserWidget.h>
#include <Engine/GameViewportClient.h>

void UMyGameInstance::ShowLoadingScreene(UUserWidget *Widget, int32 a)
{
	Widget->AddToViewport(a);
}

Can somebody help me please?

I think you need to add “UMG” module in your project module’s dependencies.
Compile will go through if you remove UFUNCTION(BlueprintCallable, Category = "Da")

More info can be found here: User Interface With UMG | Unreal Engine Documentation

Why do you #include using <> instead of “” ?

But as for your unresolved external symbols error, try this: Open %YourProjectName%.build.cs (it’s in the same /Source/%YourProjectName% folder), and in the function PublicDependencyModuleNames.AddRange(new string[] {}); add “UMG” to the list of dependencies.