Search code examples
unreal-engine4virtual-realityoculus

Compilation errors while building Oculus' Unreal Engine


I’m trying to build the UE4 version from Oculus from the GitHub repository. But during the build I keep getting some errors. I’ll link the Output log right here: https://drive.google.com/file/d/1iLFmV5mZI3r8tJjAbxVqXnlWFcI6tNbj/view?usp=sharing (38.7 KB)

Before everything comes crashing I get this:

12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(211): error C4668: '_NOEXCEPT_TYPES_SUPPORTED' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(211): error C4668: '__cpp_noexcept_function_type' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(371): error C4668: '_NOEXCEPT_TYPES_SUPPORTED' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(371): error C4668: '__cpp_noexcept_function_type' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat -Target="UE4Editor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6.
12>Done building project "UE4.vcxproj" -- FAILED.

After these lines, it starts to skip a lot.


Solution

  • Two things:

    1. Make sure you have Win10 SDK version 10.0.18362 installed as UE will try to use that
    2. I found this post and made this change and I was able to compile: https://chowdera.com/2022/03/202203261010082767.html