Hi folks, I’ve got stuck yesterday while following this guide Unreal Engine Multiplayer Sessions in C++ | An Unreal Engine Blog by Cedric Neukirchen and I slightly got stuck in the middle of it when it came down to declaring the events that included non-primitve types as arguments (FOnlineSessionSearchResult and EOnJoinSessionCompleteResult::Type)
For some reason the compiler says that it can not find the files, despite the header being included and here’s the header where this error log is pointing to: SessionSubsystem Error unable to find FOnlineSessionSearchResult Class and enum EOnJoinSessionCompleteResult · GitHub
The error log:
Running Internal UnrealHeaderTool E:\Projects\DemoMultiplayer\DemoMultiplayer.uproject E:\Projects\DemoMultiplayer\Intermediate\Build\Win64\DemoMultiplayerEditor\Development\DemoMultiplayerEditor.uhtmanifest -WarningsAsErrors -installed
10>DSessionSubsystem.h(15): Error : Unable to find 'class' with name 'FOnlineSessionSearchResult'
10>DSessionSubsystem.h(16): Error : Unable to find 'class', 'delegate', 'enum', or 'struct' with name 'EOnJoinSessionCompleteResult::Type'
Total of 0 written
Total execution time: 3.52 seconds
10>Microsoft.MakeFile.Targets(44,5): Error MSB3073 : The command ""E:\Program Files\Epic Games\UE_5.3\Engine\Build\BatchFiles\Build.bat" DemoMultiplayerEditor Win64 Development -Project="E:\Projects\DemoMultiplayer\DemoMultiplayer.uproject" -WaitMutex -FromMsBuild" exited with code 6.
the *.Build.cs file:
public DemoMultiplayer(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[]
{
"CommonUI",
"EnhancedInput",
"UMG",
"GameplayAbilities",
"GameplayTags",
"GameplayTasks",
"OnlineSubsystem",
"OnlineSubsystemUtils"
});
I have tried forward declaring FOnlineSessionSearchResult, however it yielded the same error as stated above.
Any help or insights would be greatly appreciated! Thanks a lot for your time!