4.7.1 Steamworks integration, engine won't compile

Hi all!

I’ve been using steamworks api with 4.6.1 without any issues.
Now I updated to 4.7.1, everything is great we love this update, but if I configure the steamworks api to use the latest version (1.32), the engine stops compiling with weird and nonsense errors.

Steamworks.Build.cs



// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

using System.IO;
using UnrealBuildTool;

public class Steamworks : ModuleRules
{
	public Steamworks(TargetInfo Target)
	{
		/** Mark the current version of the Steam SDK */
		string SteamVersion = "v132";
		Type = ModuleType.External;

		string SdkBase = UEBuildConfiguration.UEThirdPartySourceDirectory + "Steamworks/Steam" + SteamVersion + "/sdk";
		if (!Directory.Exists(SdkBase))
		{
			string Err = string.Format("steamworks SDK not found in {0}", SdkBase);
			System.Console.WriteLine(Err);
			throw new BuildException(Err);
		}

		PublicIncludePaths.Add(SdkBase + "/public");

		string LibraryPath = SdkBase + "/redistributable_bin/";
		string LibraryName = "steam_api";

		if ((Target.Platform == UnrealTargetPlatform.Win64) ||
			(Target.Platform == UnrealTargetPlatform.Win32))
		{
			if (Target.Platform == UnrealTargetPlatform.Win64)
			{
				LibraryPath += "win64";
				LibraryName += "64";
			}
			PublicLibraryPaths.Add(LibraryPath);
			PublicAdditionalLibraries.Add(LibraryName + ".lib");
			PublicDelayLoadDLLs.Add(LibraryName + ".dll");
		}
		else if (Target.Platform == UnrealTargetPlatform.Mac)
		{
			LibraryPath += "osx32/libsteam_api.dylib";
			PublicDelayLoadDLLs.Add(LibraryPath);
			PublicAdditionalShadowFiles.Add(LibraryPath);
		}
		else if (Target.Platform == UnrealTargetPlatform.Linux)
		{
			LibraryPath += "linux64";
			PublicLibraryPaths.Add(LibraryPath);
			PublicAdditionalLibraries.Add(LibraryName);
		}
	}
}



WinPlatform.Automation.cs:



// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using AutomationTool;
using UnrealBuildTool;


public abstract class BaseWinPlatform : Platform
{
	public BaseWinPlatform(UnrealTargetPlatform P)
		: base(P)
	{
	}

	private int StageExecutable(string Ext, DeploymentContext SC, string InPath, string Wildcard = "*", bool bRecursive = true, string] ExcludeWildcard = null, string NewPath = null, bool bAllowNone = false, StagedFileType InStageFileType = StagedFileType.NonUFS, string NewName = null)
	{
		int Result = SC.StageFiles(InStageFileType, InPath, Wildcard + Ext, bRecursive, ExcludeWildcard, NewPath, bAllowNone, true, (NewName == null) ? null : (NewName + Ext));
		if (Result > 0)
		{
			SC.StageFiles(StagedFileType.DebugNonUFS, InPath, Wildcard + "pdb", bRecursive, ExcludeWildcard, NewPath, true, true, (NewName == null) ? null : (NewName + "pdb"));
			SC.StageFiles(StagedFileType.DebugNonUFS, InPath, Wildcard + "map", bRecursive, ExcludeWildcard, NewPath, true, true, (NewName == null) ? null : (NewName + "map"));
		}
		return Result;
	}

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		// Engine non-ufs (binaries)

		if (SC.bStageCrashReporter)
		{
			StageExecutable("exe", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "CrashReportClient.");
		}

		//todo we need to support shipping and test executables
		//todo this should all be partially based on UBT manifests and not hard coded
		//monolithic assumption
		StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Ogg", SC.PlatformDir), "*.", true);
		StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Vorbis", SC.PlatformDir), "*.", true);
		string PhysXVer = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
		string ApexVer = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
		string PhysXMaskForDebugConfiguration = Params.bDebugBuildsActuallyUseDebugCRT ? "*DEBUG*.*" : "*PROFILE*.*";
		if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Debug) && !Params.Rocket)
		{
			StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/PhysX/APEX-1.3", SC.PlatformDir, ApexVer), PhysXMaskForDebugConfiguration, true);
			StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/PhysX/PhysX-3.3", SC.PlatformDir, PhysXVer), PhysXMaskForDebugConfiguration, true);
			StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/PhysX/PhysX-3.3", SC.PlatformDir, PhysXVer), "nvToolsExt*.", true);
		}
		if (SC.StageTargetConfigurations.Any(x => x != UnrealTargetConfiguration.Debug) || Params.Rocket)
		{
			StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/PhysX/APEX-1.3", SC.PlatformDir, ApexVer), "*.", true, new string] { "*DEBUG*.*", "*CHECKED*.*" });
			StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/PhysX/PhysX-3.3", SC.PlatformDir, PhysXVer), "*.", true, new string] { "*DEBUG*.*", "*CHECKED*.*" });
		}

		if (Params.bUsesSteam)
		{
			string SteamVersion = "Steamv132";

			// Check that the TPS directory exists. We don't distribute binaries for Steam in Rocket.
			if (Directory.Exists(CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion)))
			{
				if (SC.StageTargetPlatform.PlatformType == UnrealTargetPlatform.Win32)
				{
					StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "steam_api.");
					if (SC.DedicatedServer)
					{
						StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "steamclient.");
						StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "tier0_s.");
						StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "vstdlib_s.");
					}
				}
				else
				{
					StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "steam_api64.");
					if (SC.DedicatedServer)
					{
						StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "steamclient64.");
						StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "tier0_s64.");
						StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Steamworks/" + SteamVersion, SC.PlatformDir), "vstdlib_s64.");
					}
				}
			}
		}

        // Leap files
		if (!Params.Rocket)
		{
			StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/Leap", SC.PlatformDir), "Leap.", false, null, null, true);
		}
        
		// Copy the splash screen, windows specific
		SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);

		// CEF3 files
		if (Params.bUsesCEF3)
		{
			SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/CEF3", SC.PlatformDir), "*", true, null, null, true);
			StageExecutable("exe", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "UnrealCEFSubProcess.", false, null, null, true);
		}

        if (Params.StageNonMonolithic)
        {
            StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/ICU/icu4c-53_1", SC.PlatformDir, "VS2013"), "*.");

            if (SC.DedicatedServer)
            {
                StageExecutable("exe", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "UE4Server.");
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "UE4Server-*.");
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Plugins"), "UE4Server-*.", true);
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4Server-*.");
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.ProjectRoot, "Plugins"), "UE4Server-*.", true);
            }
            else
            {
                StageExecutable("exe", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "UE4.");
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "UE4-*.");
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Plugins"), "UE4-*.", true);
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4-*.");
                StageExecutable("dll", SC, CommandUtils.CombinePaths(SC.ProjectRoot, "Plugins"), "UE4-*.", true);
            }
        }
        else
        {
			List<string> Exes = GetExecutableNames(SC);

			// the first exe is the "main" one, the rest are marked as debug files
			StagedFileType WorkingFileType = StagedFileType.NonUFS;
				
		    foreach (var Exe in Exes)
            {
				if (Exe.StartsWith(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir)))
				{
					string BaseExeFileName = Path.GetFileName(Exe);
					if (!String.IsNullOrEmpty(Params.OverrideMinimumOS) && (Params.OverrideMinimumOS == "WinXP"))
					{
						BaseExeFileName = Path.GetFileNameWithoutExtension(Exe) + "_xp" + Path.GetExtension(Exe);
					}

					// remap the project root.
					string SourceFile = CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir, BaseExeFileName);
					StageExecutable("exe", SC, Path.GetDirectoryName(SourceFile), Path.GetFileNameWithoutExtension(SourceFile) + ".", true, null, CommandUtils.CombinePaths(SC.RelativeProjectRootForStage, "Binaries", SC.PlatformDir), false, WorkingFileType);
					if(Exe == Exes[0] && !Params.NoBootstrapExe)
					{
						StageBootstrapExecutable(SC, SourceFile, CombinePaths(SC.RelativeProjectRootForStage, "Binaries", SC.PlatformDir, BaseExeFileName), "");
					}
				}
				else if (Exe.StartsWith(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir)))
				{
					// Select the appropriate windows executable to stage, xp support or not.
					string ExeFileName = Path.GetFileName(Exe);
					if (!String.IsNullOrEmpty(Params.OverrideMinimumOS) && (Params.OverrideMinimumOS == "WinXP"))
					{
						ExeFileName = Path.GetFileNameWithoutExtension(ExeFileName) + "_xp" + Path.GetExtension(ExeFileName);
					}

					// keep it in the engine directory.
					string SourceFile = CombinePaths(SC.LocalRoot, "Engine", "Binaries", SC.PlatformDir, ExeFileName);

					// ensure the ue4game binary exists, if applicable
					if (!SC.IsCodeBasedProject && !FileExists_NoExceptions(SourceFile))
					{
						Log("Failed to find game executable " + SourceFile);
						AutomationTool.ErrorReporter.Error("Stage Failed.", (int)AutomationTool.ErrorCodes.Error_MissingExecutable);
						throw new AutomationException("Could not find exe {0}. You may need to build the UE4 project with your target configuration and platform.", SourceFile);
					}

					StageExecutable("exe", SC, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), Path.GetFileNameWithoutExtension(SourceFile) + ".", true, null, null, false, WorkingFileType);
					if(Exe == Exes[0] && !Params.NoBootstrapExe)
					{
						StageBootstrapExecutable(SC, SourceFile, CombinePaths("Engine", "Binaries", SC.PlatformDir, ExeFileName), String.Format("..\\..\\..\\{0}\\{0}.uproject", SC.ShortProjectName));
					}
				}
				else
				{
					throw new AutomationException("Can't stage the exe {0} because it doesn't start with {1} or {2}", Exe, CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir), CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir));
				}
				// the first exe is the "main" one, the rest are marked as debug files
				WorkingFileType = StagedFileType.DebugNonUFS;
			}
		}
	}

	void StageBootstrapExecutable(DeploymentContext SC, string TargetFile, string StagedRelativeTargetPath, string StagedArguments)
	{
		string InputFile = CombinePaths(SC.LocalRoot, "Engine", "Binaries", SC.PlatformDir, String.Format("BootstrapPackagedGame-{0}-Shipping.exe", SC.PlatformDir));
		if(InternalUtils.SafeFileExists(InputFile))
		{
			// Create the new bootstrap program
			string ExeName = String.Format("{0}.exe", SC.ShortProjectName);

			string IntermediateDir = CombinePaths(SC.ProjectRoot, "Intermediate", "Staging");
			InternalUtils.SafeCreateDirectory(IntermediateDir);

			string IntermediateFile = CombinePaths(IntermediateDir, ExeName);
			File.Copy(InputFile, IntermediateFile, true);
	
			// Get the icon from the build directory if possible
			GroupIconResource GroupIcon = null;
			if(InternalUtils.SafeFileExists(CombinePaths(SC.ProjectRoot, "Build/Windows/Application.ico")))
			{
				GroupIcon = GroupIconResource.FromIco(CombinePaths(SC.ProjectRoot, "Build/Windows/Application.ico"));
			}
			if(GroupIcon == null)
			{
				GroupIcon = GroupIconResource.FromExe(TargetFile);
			}

			// Update the resources in the new file
			using(ModuleResourceUpdate Update = new ModuleResourceUpdate(IntermediateFile, true))
			{
				const int IconResourceId = 101;
				if(GroupIcon != null) Update.SetIcons(IconResourceId, GroupIcon);

				const int ExecFileResourceId = 201;
				Update.SetData(ExecFileResourceId, ResourceType.RawData, Encoding.Unicode.GetBytes(StagedRelativeTargetPath + "\0"));

				const int ExecArgsResourceId = 202;
				Update.SetData(ExecArgsResourceId, ResourceType.RawData, Encoding.Unicode.GetBytes(StagedArguments + "\0"));
			}

			// Copy it to the staging directory
			SC.StageFiles(StagedFileType.NonUFS, IntermediateDir, ExeName, false, null, "");
		}
	}

	public override string GetCookPlatform(bool bDedicatedServer, bool bIsClientOnly, string CookFlavor)
	{
		const string NoEditorCookPlatform = "WindowsNoEditor";
		const string ServerCookPlatform = "WindowsServer";
		const string ClientCookPlatform = "WindowsClient";

		if (bDedicatedServer)
		{
			return ServerCookPlatform;
		}
		else if (bIsClientOnly)
		{
			return ClientCookPlatform;
		}
		else
		{
			return NoEditorCookPlatform;
		}
	}

	public override string GetEditorCookPlatform()
	{
		return "Windows";
	}

	public override void Package(ProjectParams Params, DeploymentContext SC, int WorkingCL)
	{
		// package up the program, potentially with an installer for Windows
		PrintRunTime();
	}

	public override bool CanHostPlatform(UnrealTargetPlatform Platform)
	{
		if (Platform == UnrealTargetPlatform.Mac)
		{
			return false;
		}
		return true;
	}

	public override List<string> GetExecutableNames(DeploymentContext SC, bool bIsRun = false)
	{
		var ExecutableNames = new List<String>();
		string Ext = AutomationTool.Platform.GetExeExtension(TargetPlatformType);
		if (!String.IsNullOrEmpty(SC.CookPlatform))
		{
			if (SC.StageExecutables.Count() > 0)
			{
				foreach (var StageExecutable in SC.StageExecutables)
				{
					string ExeName = SC.StageTargetPlatform.GetPlatformExecutableName(StageExecutable);
					if(SC.IsCodeBasedProject)
					{
						ExecutableNames.Add(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir, ExeName + Ext));
					}
					else
					{
						ExecutableNames.Add(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir, ExeName + Ext));
					}
				}
			}
			//@todo, probably the rest of this can go away once everything passes it through
			else if (SC.DedicatedServer)
			{
				if (!SC.IsCodeBasedProject)
				{
					string ExeName = SC.StageTargetPlatform.GetPlatformExecutableName("UE4Server");
					ExecutableNames.Add(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir, ExeName + Ext));
				}
				else
				{
					string ExeName = SC.StageTargetPlatform.GetPlatformExecutableName(SC.ShortProjectName + "Server");
					string ClientApp = CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir, ExeName + Ext);
					var TestApp = CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir, SC.ShortProjectName + "Server" + Ext);
					string Game = "Game";
					//@todo, this is sketchy, someone might ask what the exe is before it is compiled
					if (!FileExists_NoExceptions(ClientApp) && !FileExists_NoExceptions(TestApp) && SC.ShortProjectName.EndsWith(Game, StringComparison.InvariantCultureIgnoreCase))
					{
						ExeName = SC.StageTargetPlatform.GetPlatformExecutableName(SC.ShortProjectName.Substring(0, SC.ShortProjectName.Length - Game.Length) + "Server");
						ClientApp = CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir, ExeName + Ext);
					}
					ExecutableNames.Add(ClientApp);
				}
			}
			else
			{
				if (!SC.IsCodeBasedProject && !bIsRun)
				{
					string ExeName = SC.StageTargetPlatform.GetPlatformExecutableName("UE4Game");
					ExecutableNames.Add(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir, ExeName + Ext));
				}
				else
				{
					string ExeName = SC.StageTargetPlatform.GetPlatformExecutableName(SC.ShortProjectName);
					ExecutableNames.Add(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir, ExeName + Ext));
				}
			}
		}
		else
		{
			string ExeName = SC.StageTargetPlatform.GetPlatformExecutableName("UE4Editor");
			ExecutableNames.Add(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir, ExeName + Ext));
		}
		return ExecutableNames;
	}

	public override List<string> GetDebugFileExtentions()
	{
		return new List<string> { ".pdb", ".map" };
	}
}

public class Win64Platform : BaseWinPlatform
{
	public Win64Platform()
		: base(UnrealTargetPlatform.Win64)
	{
	}

	public override bool IsSupported { get { return true; } }

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		base.GetFilesToDeployOrStage(Params, SC);
		
		if(Params.Prereqs)
		{
			string InstallerRelativePath = CombinePaths("Engine", "Extras", "Redist", "en-us");
			SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, InstallerRelativePath), "UE4PrereqSetup_x64.exe", false, null, InstallerRelativePath);
		}
	}
}

public class Win32Platform : BaseWinPlatform
{
	public Win32Platform()
		: base(UnrealTargetPlatform.Win32)
	{
	}

	public override bool IsSupported { get { return true; } }

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		base.GetFilesToDeployOrStage(Params, SC);
		
		if(Params.Prereqs)
		{
			string InstallerRelativePath = CombinePaths("Engine", "Extras", "Redist", "en-us");
			SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, InstallerRelativePath), "UE4PrereqSetup_x86.exe", false, null, InstallerRelativePath);
		}
	}
}



OnlineSubsystemSteamPrivatePCH.h:



// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "Engine.h"
#include "OnlineSubsystemSteamModule.h"
#include "OnlineSubsystemModule.h"
#include "OnlineSubsystemUtils.h"
#include "OnlineSubsystemUtilsClasses.h"
#include "OnlineSubsystem.h"
#include "OnlineSubsystemUtils.h"
#include "SocketSubsystem.h"

#include "ModuleManager.h"

#define INVALID_INDEX -1

/** Compile Steam SDK version in use */
#define STEAM_SDK_VER TEXT("1.32")
/** Path of the current Steam SDK version in use */
#define STEAM_SDK_VER_PATH TEXT("Steamv132")
/** Root location of Steam SDK */
#define STEAM_SDK_ROOT_PATH TEXT("Binaries/ThirdParty/Steamworks")

/** FName declaration of Steam subsystem */
#define STEAM_SUBSYSTEM FName(TEXT("STEAM"))
/** URL Prefix when using Steam socket connection */
#define STEAM_URL_PREFIX TEXT("steam.")
/** Filename containing the appid during development */
#define STEAMAPPIDFILENAME TEXT("steam_appid.txt")

/** pre-pended to all steam logging */
#undef ONLINE_LOG_PREFIX
#define ONLINE_LOG_PREFIX TEXT("STEAM: ")

// @todo Steam: Steam headers trigger secure-C-runtime warnings in Visual C++. Rather than mess with _CRT_SECURE_NO_WARNINGS, we'll just
//	disable the warnings locally. Remove when this is fixed in the SDK
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4996)
#endif

// Steamworks SDK headers
#include "steam/steam_api.h"
#include "steam/steam_gameserver.h"

// @todo Steam: See above
#ifdef _MSC_VER
#pragma warning(pop)
#endif




The errors I’m getting:



1>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
1>  Performing 4 actions (4 in parallel)
1>  Module.OnlineSubsystemSteam.cpp
1>  Module.SteamVR.cpp
1>f:\6 - desarrollo\unrealengine-4.7.1-release\engine\source\runtime\renderer\private\PrimitiveSceneInfo.h(34): error C2059: syntax error : ';'
1>f:\6 - desarrollo\unrealengine-4.7.1-release\engine\source\runtime\renderer\private\PrimitiveSceneInfo.h(34): error C2143: syntax error : missing ';' before ')'
1>f:\6 - desarrollo\unrealengine-4.7.1-release\engine\source\runtime\renderer\private\PrimitiveSceneInfo.h(35): error C2143: syntax error : missing ';' before '{'
1>f:\6 - desarrollo\unrealengine-4.7.1-release\engine\source\runtime\renderer\private\PrimitiveSceneInfo.h(39): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Source\Runtime\Online\OnlineSubsystemSteam\Private\OnlineIdentityInterfaceSteam.cpp(185): error C2059: syntax error : ','
1>F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Source\Runtime\Online\OnlineSubsystemSteam\Private\OnlineIdentityInterfaceSteam.cpp(187): error C2143: syntax error : missing ';' before '{'
1>F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Source\Runtime\Online\OnlineSubsystemSteam\Private\OnlineIdentityInterfaceSteam.cpp(194): error C2181: illegal else without matching if
1>F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Source\Runtime\Online\OnlineSubsystemSteam\Private\OnlineSessionAsyncServerSteam.cpp(949): error C2660: 'FString::Mid' : function does not take 0 arguments
1>F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Source\Runtime\Online\OnlineSubsystemSteam\Private\OnlineSessionAsyncServerSteam.cpp(1202): error C2059: syntax error : ')'
1>F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Source\Runtime\Online\OnlineSubsystemSteam\Private\OnlineSessionAsyncServerSteam.cpp(1203): error C2143: syntax error : missing ';' before '{'
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: F:\6 - Desarrollo\UnrealEngine-4.7.1-release\Engine\Plugins\Experimental\SteamVR\Binaries\Win64\UE4Editor-SteamVR.dll
1>  Cumulative action seconds (8 processors): 0,00 building projects, 157,63 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
1>  UBT execution time: 107,49 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UE4Editor Win64 Development" exited with code -1.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


I have the steam “sdk” folder inside Steamv132 in Engine/Source/ThirdParty/Steamworks and configured everything exactly as I did with 4.6.1.

Any ideas why this is happening?

Thank you

If i set everything to v130 it compiles again. I think there’s another v130 hardcoded and i’m not aware of it.
About that, why is the steam version hardcoded everywhere? I think it’s a huge design fail.

Temporary Fix to Steam 1.32 Compile Issue

You are correct, there is another hardcode which you can fix in SteamVRPrivatePCH.h in the Plugins/Experimental/SteamVR folder.

Also there’s actually an issue with the newest Steam SDK where it clobbers a define created by Unreal (which is why you get the compile errors). To fix this temporarily, insert this code after all of the #include “steam/…” in SteamVRPrivatePCH.h and OnlineSubsystemSteamPrivatePCH.h

Code:


// Steamworks SDK Clobber Define Fix
#undef ARRAY_COUNT
#define ARRAY_COUNT ( array ) (sizeof(ArrayCountHelper(array))+0)

Gah, thanks for this fix - we still get this in 4.12 when we include “steam/steam_api.h”