What happened:
UE4 plugin compilation failed.
What you expected to happen:
UE4 plugin compilation should succeed.
How to reproduce it (as minimally and precisely as possible):
Results in compilation failure:
------ Build started: Project: AgonesTest, Configuration: Development_Editor x64 ------
Using 'git status' to determine working set for adaptive non-unity build (E:\UE4PrivateExamples).
Invalidating makefile for AgonesTestEditor (AgonesTestEditor.Target.cs modified)
Parsing headers for AgonesTestEditor
Running UnrealHeaderTool "E:\UE4PrivateExamples\AgonesTest\AgonesTest.uproject" "E:\UE4PrivateExamples\AgonesTest\Intermediate\Build\Win64\AgonesTestEditor\Development\AgonesTestEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for AgonesTestEditor in 5.8996207 seconds
Building AgonesTestEditor...
Using Visual Studio 2019 14.24.28315 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314) and Windows 10.0.16299.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Building 11 actions with 8 processes...
[1/11] Module.Agones.cpp
E:\UE4PrivateExamples\AgonesTest\Plugins\Agones\Source\Agones\Public\Agones.h(18): fatal error C1083: Cannot open include file: 'ModuleManager.h': No such file or directory
[2/11] Module.Agones.gen.cpp
E:\UE4PrivateExamples\AgonesTest\Plugins\Agones\Source\Agones\Model\GameServerObjectMeta.h(18): fatal error C1083: Cannot open include file: 'JsonObject.h': No such file or directory
[3/11] AgonesTest.cpp
[4/11] AgonesTest.init.gen.cpp
[5/11] AgonesTestGameModeBase.cpp
[6/11] AgonesTestGameModeBase.gen.cpp
[7/11] UE4Editor-AgonesTest.lib
Creating library E:\UE4PrivateExamples\AgonesTest\Intermediate\Build\Win64\UE4Editor\Development\AgonesTest\UE4Editor-AgonesTest.lib and object E:\UE4PrivateExamples\AgonesTest\Intermediate\Build\Win64\UE4Editor\Development\AgonesTest\UE4Editor-AgonesTest.exp
[8/11] UE4Editor-AgonesTest.dll
Creating library E:\UE4PrivateExamples\AgonesTest\Intermediate\Build\Win64\UE4Editor\Development\AgonesTest\UE4Editor-AgonesTest.suppressed.lib and object E:\UE4PrivateExamples\AgonesTest\Intermediate\Build\Win64\UE4Editor\Development\AgonesTest\UE4Editor-AgonesTest.suppressed.exp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command "C:\UnrealEngine\UE_4.24\Engine\Build\BatchFiles\Build.bat AgonesTestEditor Win64 Development -Project="E:\UE4PrivateExamples\AgonesTest\AgonesTest.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
Done building project "AgonesTest.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Anything else we need to know?:
I have a fix for this already. I'm preparing a PR now.
Environment:
kubectl version): n/aI have a fix for this for both master and the 1.13 branch. The problem is that in UE 4.24, Unreal Build Tool introduced the concept of default build settings. Build settings determine how include directories are searched.
By default in UE 4.24, projects use build settings v2, which requires include path prefixes.
Here's an example V1 (legacy) target.cs file:
```c#
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class AgonesTestEditorTarget : TargetRules
{
public AgonesTestEditorTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V1;
ExtraModuleNames.AddRange( new string[] { "AgonesTest" } );
}
}
Here's an example V2 (new) target.cs:
```c#
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class AgonesTestEditorTarget : TargetRules
{
public AgonesTestEditorTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "AgonesTest" } );
}
}
/assign @dzlier-gcp
I had the same problem when compiling spout on unreal Version: 4.24.3-11590370.
Finding the files where stated V2 and changing to V1 made the project build.
Thanks!
see this, https://bbs.comblockengine.com/forum.php?mod=viewthread&tid=8889&extra= ,it may help you , similar question of yours.