Packaging Problem ('STEAM_SDK_INSTALLED' is not defined)

if you have such an issue, make sure that the STEAM_SDK_INSTALLED macro is defined correctly in the .Build.cs file.
In the case of the VRExpansionPlugin Plugin, look for the AdvancedSteamSessions.Build.cs file associated with your project or the AdvancedSteamSessions plugin.

Add the following logic inside the TargetRules method in that file:
if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Android)
{
PublicDefinitions.Add(“STEAM_SDK_INSTALLED=1”);
}
else
{
PublicDefinitions.Add(“STEAM_SDK_INSTALLED=0”);
}
In any case, below, “AdvancedSteamSessions.Build.cs” in its entirety:

using UnrealBuildTool;
using System.IO;

public class AdvancedSteamSessions : ModuleRules
{
public AdvancedSteamSessions(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
//bEnforceIWYU = true;

    PublicDefinitions.Add("WITH_ADVANCED_STEAM_SESSIONS=1");

    PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "CoreUObject", "OnlineSubsystemUtils", "Networking", "Sockets", "AdvancedSessions"/*"Voice", "OnlineSubsystemSteam"*/ });
    PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "Sockets", "Networking", "OnlineSubsystemUtils" /*"Voice", "Steamworks","OnlineSubsystemSteam"*/});

    if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
    {
        PublicDependencyModuleNames.AddRange(new string[] { "SteamShared", "Steamworks"/*, "OnlineSubsystemSteam"*/ });
        //PublicIncludePaths.AddRange(new string[] { "../Plugins/Online/OnlineSubsystemSteam/Source/Private" });// This is dumb but it isn't very open
    }

if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Android)
{
PublicDefinitions.Add(“STEAM_SDK_INSTALLED=1”);
}
else
{
PublicDefinitions.Add(“STEAM_SDK_INSTALLED=0”);
}
}
}

Cheers

Giovanni Messina

1 Like