Problems with UnrealBuildTool

Hey guys, i’m finishing building the Shipping version of my plugin (to test it before sending it to Epic).
But the linking process is failing.

It just says that UBT failed, i manually ran UBT and this is what gave me


UBT Running for Rocket: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\HostProject.uproject
UnrealBuildTool (DEBUG OUTPUT MODE)
Command-line: UE4Game Win32 Development -project=C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\HostProject.uproject -module PaperZD -receipt C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Binaries\Win32\UE4Game.target -NoHotReload -ignorejunk -verbose
Searching for ToolChains, BuildPlatforms, BuildDeploys and ProjectGenerators…
Registering build platform: UnrealBuildTool.MacPlatformFactory
Registering build platform: UnrealBuildTool.TVOSPlatformFactory
Registering build platform: UnrealBuildTool.AndroidPlatformFactory
UnrealBuildTool.AndroidPlatformSDK has no valid SDK
Registering build platform: UnrealBuildTool.IOSPlatformFactory
UnrealBuildTool.IOSPlatformSDK has no valid SDK
Registering for IOS
Registering build platform: UnrealBuildTool.HTML5PlatformFactory
UnrealBuildTool.HTML5PlatformSDK using manually installed SDK incoming
Registering for HTML5
Registering build platform: UnrealBuildTool.LinuxPlatformFactory
UnrealBuildTool.LinuxPlatformSDK has no valid SDK
Registering build platform: UnrealBuildTool.WindowsPlatformFactory
UnrealBuildTool.WindowsPlatformSDK using manually installed SDK
Registering for Win64
Registering for Win32
Registering project generator: UnrealBuildTool.MacProjectGenerator
Registering for Mac
Skipping project file generator registration for Mac due to no valid BuildPlatform.
Registering project generator: UnrealBuildTool.TVOSProjectGenerator
Registering for TVOS
Skipping project file generator registration for TVOS due to no valid BuildPlatform.
Registering project generator: UnrealBuildTool.AndroidProjectGenerator
Registering for Android
Skipping project file generator registration for Android due to no valid BuildPlatform.
Registering project generator: UnrealBuildTool.IOSProjectGenerator
Registering for IOS
Registering project generator: UnrealBuildTool.HTML5ProjectGenerator
Registering for HTML5
Registering project generator: UnrealBuildTool.LinuxProjectGenerator
Registering for Linux
Skipping project file generator registration for Linux due to no valid BuildPlatform.
Registering project generator: UnrealBuildTool.WindowsProjectGenerator
Registering for Win32
Registering for Win64
GetHeaderToolTimestamp took 0.0350052s
Generated code is up to date.
PCH.PaperZD.cpp: Produced item “PCH.PaperZD.h.pch” doesn’t exist.
PCH.PaperZD.cpp: Produced item “PCH.PaperZD.h.obj” doesn’t exist.
Outdated action: PCH.PaperZD.cpp
→ DEEP include scan: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Intermediate\Build\Win32\UE4\Development\PaperZD\PCH.PaperZD.h
PCH.UELinkerFixups.cpp: Produced item “PCH.UELinkerFixups.h.pch” doesn’t exist.
PCH.UELinkerFixups.cpp: Produced item “PCH.UELinkerFixups.h.obj” doesn’t exist.
Outdated action: PCH.UELinkerFixups.cpp
→ DEEP include scan: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Intermediate\Build\Win32\UE4\Development\UELinkerFixups\PCH.UELinkerFixups.h
Module.PaperZD.cpp: Produced item “Module.PaperZD.cpp.obj” doesn’t exist.
Outdated action: Module.PaperZD.cpp
→ DEEP include scan: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Intermediate\Build\Win32\UE4\Development\PaperZD\Module.PaperZD.cpp
PaperZD.generated.cpp: Produced item “PaperZD.generated.cpp.obj” doesn’t exist.
Outdated action: PaperZD.generated.cpp
→ DEEP include scan: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Intermediate\Build\Win32\UE4\Inc\PaperZD\PaperZD.generated.cpp
UELinkerFixups.cpp: Produced item “UELinkerFixups.cpp.obj” doesn’t exist.
Outdated action: UELinkerFixups.cpp
→ DEEP include scan: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Intermediate\Build\Win32\UE4\Development\UELinkerFixups.cpp
UE4-PaperZD.lib: Produced item “UE4-PaperZD.lib” doesn’t exist.
6 actions, 6 outdated and requested actions
Couldn’t resolve included file “PS4\PS4PlatformCompilerPreSetup.h”
Couldn’t resolve included file “XboxOne\XboxOnePlatformCompilerPreSetup.h”
Couldn’t resolve included file “Switch\SwitchPlatformCompilerPreSetup.h”
Couldn’t resolve included file “stddef.h”
Couldn’t resolve included file “PS4\PS4Platform.h”
Couldn’t resolve included file “XboxOne\XboxOnePlatform.h”
Couldn’t resolve included file “Switch\SwitchPlatform.h”
Couldn’t resolve included file “PS4\PS4CompilerSetup.h”
Couldn’t resolve included file “XboxOne\XboxOneCompilerSetup.h”
Couldn’t resolve included file “Switch\SwitchPlatformCompilerSetup.h”
Couldn’t resolve included file “sal.h”
Couldn’t resolve included file “linux\version.h”
Couldn’t resolve included file “new”
Couldn’t resolve included file “wchar.h”
Couldn’t resolve included file “stddef.h”
Couldn’t resolve included file “stdlib.h”
Couldn’t resolve included file “stdio.h”
Couldn’t resolve included file “stdarg.h”
Couldn’t resolve included file “math.h”
Couldn’t resolve included file “float.h”
Couldn’t resolve included file “string.h”
Couldn’t resolve included file “PS4\PS4Misc.h”
Couldn’t resolve included file “XboxOne\XboxOneMisc.h”
Couldn’t resolve included file “Switch\SwitchPlatformMisc.h”
Couldn’t resolve included file “PS4\PS4Memory.h”
Couldn’t resolve included file “XboxOne\XboxOneMemory.h”
Couldn’t resolve included file “Switch\SwitchPlatformMemory.h”
Couldn’t resolve included file “wchar.h”
Couldn’t resolve included file “string.h”
Couldn’t resolve included file “intrin.h”
Couldn’t resolve included file “stdint.h”
Couldn’t resolve included file “tchar.h”
Couldn’t resolve included file “intsafe.h”
Couldn’t resolve included file “strsafe.h”
Couldn’t resolve included file “CodeAnalysis\SourceAnnotations.h”
Couldn’t resolve included file “CodeAnalysis\Warnings.h”
Couldn’t resolve included file “Carbon\Carbon.h”
Couldn’t resolve included file “CoreServices\CoreServices.h”
Couldn’t resolve included file “CoreFoundation\CoreFoundation.h”
Couldn’t resolve included file “string.h”
Couldn’t resolve included file “alloca.h”
Couldn’t resolve included file “stdlib.h”
Couldn’t resolve included file “stdio.h”
Couldn’t resolve included file “float.h”
Couldn’t resolve included file “ctype.h”
Couldn’t resolve included file “stdarg.h”
Couldn’t resolve included file “stdint.h”
Couldn’t resolve included file “limits.h”
Couldn’t resolve included file “sys ime.h”
Couldn’t resolve included file “math.h”
Couldn’t resolve included file “mach\mach_time.h”
Couldn’t resolve included file “wchar.h”
Couldn’t resolve included file “wctype.h”
Couldn’t resolve included file “errno.h”
Couldn’t resolve included file “unistd.h”
Couldn’t resolve included file “pthread.h”
Couldn’t resolve included file “libkern\OSAtomic.h”
Couldn’t resolve included file “sys ypes.h”
Couldn’t resolve included file “sys\stat.h”
Couldn’t resolve included file “pwd.h”
Couldn’t resolve included file “fcntl.h”
Couldn’t resolve included file “dirent.h”
Couldn’t resolve included file “dlfcn.h”
Couldn’t resolve included file “copyfile.h”
Couldn’t resolve included file “utime.h”
Couldn’t resolve included file “mach\mach_host.h”
Couldn’t resolve included file “mach ask.h”
Couldn’t resolve included file “execinfo.h”
Couldn’t resolve included file “signal.h”
Couldn’t resolve included file “sys\sysctl.h”
Couldn’t resolve included file “malloc\malloc.h”
Couldn’t resolve included file “xmmintrin.h”
Couldn’t resolve included file “CoreFoundation\CoreFoundation.h”
Couldn’t resolve included file “string.h”
Couldn’t resolve included file “alloca.h”
Couldn’t resolve included file “stdlib.h”
Couldn’t resolve included file “stdio.h”
Couldn’t resolve included file “float.h”
Couldn’t resolve included file “ctype.h”
Couldn’t resolve included file “stdarg.h”
Couldn’t resolve included file “stdint.h”
Couldn’t resolve included file “limits.h”
Couldn’t resolve included file “sys ime.h”
Couldn’t resolve included file “math.h”
Couldn’t resolve included file “mach\mach_time.h”
Couldn’t resolve included file “wchar.h”
Couldn’t resolve included file “wctype.h”
Couldn’t resolve included file “errno.h”
Couldn’t resolve included file “unistd.h”
Couldn’t resolve included file “pthread.h”
Couldn’t resolve included file “libkern\OSAtomic.h”
Couldn’t resolve included file “sys ypes.h”
Couldn’t resolve included file “sys\stat.h”
Couldn’t resolve included file “pwd.h”
Couldn’t resolve included file “fcntl.h”
Couldn’t resolve included file “dirent.h”
Couldn’t resolve included file “dlfcn.h”
Couldn’t resolve included file “copyfile.h”
Couldn’t resolve included file “utime.h”
Couldn’t resolve included file “mach\mach.h”
Couldn’t resolve included file “mach\mach_host.h”
Couldn’t resolve included file “execinfo.h”
Couldn’t resolve included file “signal.h”
Couldn’t resolve included file “sys\sysctl.h”
Couldn’t resolve included file “xmmintrin.h”
Couldn’t resolve included file “arm_neon.h”
Couldn’t resolve included file “stdio.h”
Couldn’t resolve included file “stdlib.h”
Couldn’t resolve included file “stdint.h”
Couldn’t resolve included file “ctype.h”
Couldn’t resolve included file “wctype.h”
Couldn’t resolve included file “pthread.h”
Couldn’t resolve included file “limits.h”
Couldn’t resolve included file “fcntl.h”
Couldn’t resolve included file “sys\stat.h”
Couldn’t resolve included file “utime.h”
Couldn’t resolve included file “emscripten\emscripten.h”
Couldn’t resolve included file “stdio.h”
Couldn’t resolve included file “stdlib.h”
Couldn’t resolve included file “stdint.h”
Couldn’t resolve included file “ctype.h”
Couldn’t resolve included file “wctype.h”
Couldn’t resolve included file “limits.h”
Couldn’t resolve included file “intrin.h”
Couldn’t resolve included file “string.h”
Couldn’t resolve included file “alloca.h”
Couldn’t resolve included file “stdlib.h”
Couldn’t resolve included file “stdio.h”
Couldn’t resolve included file “float.h”
Couldn’t resolve included file “ctype.h”
Couldn’t resolve included file “stdarg.h”
Couldn’t resolve included file “stdint.h”
Couldn’t resolve included file “limits.h”
Couldn’t resolve included file “sys ime.h”
Couldn’t resolve included file “math.h”
Couldn’t resolve included file “wchar.h”
Couldn’t resolve included file “wctype.h”
Couldn’t resolve included file “errno.h”
Couldn’t resolve included file “unistd.h”
Couldn’t resolve included file “pthread.h”
Couldn’t resolve included file “sys ypes.h”
Couldn’t resolve included file “sys\stat.h”
Couldn’t resolve included file “pwd.h”
Couldn’t resolve included file “fcntl.h”
Couldn’t resolve included file “dirent.h”
Couldn’t resolve included file “dlfcn.h”
Couldn’t resolve included file “utime.h”
Couldn’t resolve included file “execinfo.h”
Couldn’t resolve included file “signal.h”
Couldn’t resolve included file “sys\sysctl.h”
Couldn’t resolve included file “xmmintrin.h”
Couldn’t resolve included file “sys\utsname.h”
Couldn’t resolve included file “libgen.h”
Couldn’t resolve included file “PS4\PS4Atomics.h”
Couldn’t resolve included file “XboxOne\XboxOneAtomics.h”
Couldn’t resolve included file “Switch\SwitchPlatformAtomics.h”
Couldn’t resolve included file “intrin.h”
Couldn’t resolve included file “PS4\PS4CriticalSection.h”
Couldn’t resolve included file “XboxOne\XboxOneCriticalSection.h”
Couldn’t resolve included file “Switch\SwitchCriticalSection.h”
Couldn’t resolve included file “pthread.h”
Couldn’t resolve included file “errno.h”
Couldn’t resolve included file “initializer_list”
Couldn’t resolve included file “PS4\PS4Math.h”
Couldn’t resolve included file “XboxOne\XboxOneMath.h”
Couldn’t resolve included file “Switch\SwitchPlatformMath.h”
Couldn’t resolve included file “intrin.h”
Couldn’t resolve included file “XboxOne\XboxOneSystemIncludes.h”
Couldn’t resolve included file “new”
Couldn’t resolve included file “PS4\PS4Properties.h”
Couldn’t resolve included file “XboxOne\XboxOneProperties.h”
Couldn’t resolve included file “Switch\SwitchPlatformProperties.h”
Couldn’t resolve included file “ctype.h”
Couldn’t resolve included file “wctype.h”
Couldn’t resolve included file “PS4\PS4String.h”
Couldn’t resolve included file “XboxOne\XboxOneString.h”
Couldn’t resolve included file “Switch\SwitchPlatformString.h”
Couldn’t resolve included file “wchar.h”
Couldn’t resolve included file “PS4\PS4TLS.h”
Couldn’t resolve included file “XboxOne\XboxOneTLS.h”
Couldn’t resolve included file “Switch\SwitchPlatformTLS.h”
Couldn’t resolve included file “sys\syscall.h”
Couldn’t resolve included file “new”
Couldn’t resolve included file “initializer_list”
Couldn’t resolve included file “initializer_list”
Couldn’t resolve included file “DirectXMath.h”
Couldn’t resolve included file “DirectXPackedVector.h”
Couldn’t resolve included file “emmintrin.h”
Couldn’t resolve included file “arm_neon.h”
Couldn’t resolve included file “PS4\PS4StackWalk.h”
Couldn’t resolve included file “XboxOne\XboxOneStackWalk.h”
Couldn’t resolve included file “Switch\SwitchPlatformStackWalk.h”
Couldn’t resolve included file “sys ime.h”
Couldn’t resolve included file “PS4\PS4Time.h”
Couldn’t resolve included file “XboxOne\XboxOneTime.h”
Couldn’t resolve included file “Switch\SwitchPlatformTime.h”
Couldn’t resolve included file “time.h”
Couldn’t resolve included file “sys imeb.h”
Couldn’t resolve included file “time.h”
Couldn’t resolve included file “emscripten\emscripten.h”
Couldn’t resolve included file “PS4\PS4Process.h”
Couldn’t resolve included file “XboxOne\XboxOneProcess.h”
Couldn’t resolve included file “Switch\SwitchPlatformProcess.h”
Couldn’t resolve included file “sys\sysctl.h”
Couldn’t resolve included file “PS4\PS4OutputDevices.h”
Couldn’t resolve included file “XboxOne\XboxOneOutputDevices.h”
Couldn’t resolve included file “Switch\SwitchPlatformOutputDevices.h”
Couldn’t resolve included file “PS4\PS4Splash.h”
Couldn’t resolve included file “XboxOne\XboxOneSplash.h”
Couldn’t resolve included file “Switch\SwitchPlatformSplash.h”
Couldn’t resolve included file “PS4\PS4File.h”
Couldn’t resolve included file “XboxOne\XboxOneFile.h”
Couldn’t resolve included file “Switch\SwitchPlatformFile.h”
Couldn’t resolve included file “jni.h”
Couldn’t resolve included file “PS4\PS4Survey.h”
Couldn’t resolve included file “XboxOne\XboxOneSurvey.h”
Couldn’t resolve included file “Switch\SwitchPlatformSurvey.h”
Couldn’t resolve included file “XboxOne\XBoxOneAffinity.h”
Couldn’t resolve included file “PS4\PS4Affinity.h”
Couldn’t resolve included file “Switch\SwitchPlatformAffinity.h”
Couldn’t resolve included file “UnrealEd.h”
Performing 6 actions (4 in parallel)
Executing: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x86\cl.exe @“C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Intermediate\Build\Win32\UE4\Development\PaperZD\PCH.PaperZD.h.pch.response”
Executing: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x86\cl.exe @“C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Intermediate\Build\Win32\UE4\Development\UELinkerFixups\PCH.UELinkerFixups.h.pch.response”
Cumulative thread seconds (8 processors): 0.21
Cumulative action seconds (8 processors): 0.00 building projects, 0.21 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
ERROR: UBT ERROR: Failed to produce item: C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins\PaperZD\Binaries\Win32\UE4-PaperZD.lib
Total build time: 2.14 seconds (Local executor: 0.00 seconds)
Execution time: 2.2932013

The problem is that i have absolutely no idea why is failing, it must be the included files that it can’t solve, or the fact that it says

PCH.PaperZD.cpp: Produced item “PCH.PaperZD.h.pch” doesn’t exist.
PCH.PaperZD.cpp: Produced item “PCH.PaperZD.h.obj” doesn’t exist.

and so on…
what can i do to debug this?

The UBT seems to work if i build it using win64, but fails for win32.

./UnrealBuildTool.exe UE4Game Win64 Development -project=“C:\Users\DarkK\Docum
ents\PaperZD\PaperZD\HostProject\HostProject.uproject” -module PaperZD -receipt C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins
\PaperZD\Binaries\Win64\UE4Game.target -NoHotReload -ignorejunk -verbose

^WORKS

./UnrealBuildTool.exe UE4Game Win32 Development -project=“C:\Users\DarkK\Docum
ents\PaperZD\PaperZD\HostProject\HostProject.uproject” -module PaperZD -receipt C:\Users\DarkK\Documents\PaperZD\PaperZD\HostProject\Plugins
\PaperZD\Binaries\Win32\UE4Game.target -NoHotReload -ignorejunk -verbose

^FAILS with what i stated above

Could it be related with this?