編譯4.27.2源码时报错

C4668 ‘_NOEXCEPT_TYPES_SUPPORTED’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’

解决:
“C:\UnrealEngine-4.27.2-release\Engine\Plugins\Runtime\AR\Microsoft\HoloLensAR\Source\HoloLensTargetPlatform\HoloLensTargetPlatform.Build.cs”
末尾加一行

		bEnableUndefinedIdentifierWarnings = false;

改过的文件

// Copyright Epic Games, Inc. All Rights Reserved.

using System;
using System.IO;
using UnrealBuildTool;

public class HoloLensTargetPlatform : ModuleRules
{
	public HoloLensTargetPlatform(ReadOnlyTargetRules Target) : base(Target)
    {
		PrivateDependencyModuleNames.AddRange(
			new string[] {
				"Core",
                "CoreUObject",
				"Settings",
                "EngineSettings",
                "TargetPlatform",
				"DesktopPlatform",
				"HTTP",
                "Json",
                "HoloLensPlatformEditor",
            }
        );

		PrivateIncludePathModuleNames.Add("Settings");

        int Win10Build = 0;
        Version ver = null;
        if (Version.TryParse(Target.WindowsPlatform.WindowsSdkVersion, out ver))
        {
            Win10Build = ver.Build;
        }

        //there is a WinSDK bug that prevented to include the file into this version
		if(Win10Build != 0 && Win10Build != 16299)
        {
            PrivateDefinitions.Add("APPXPACKAGING_ENABLE=1");
        }
		else
        {
            PrivateDefinitions.Add("APPXPACKAGING_ENABLE=0");
        }

        // compile withEngine
        if (Target.bCompileAgainstEngine)
		{
			PrivateDependencyModuleNames.Add("Engine");
			PrivateIncludePathModuleNames.Add("TextureCompressor");
		}

		PublicSystemLibraries.Add("shlwapi.lib");
        PublicSystemLibraries.Add("runtimeobject.lib");

		/
		bEnableUndefinedIdentifierWarnings = false;
	}
}

参考:
https://forums.unrealengine.com/t/cant-build-unreal-editor-4-27-2-from-source/654850/11

你可能感兴趣的:(unreal4,unreal,engine,unreal,engine,4,unreal)