Download

Compile errors updating from 4.26.2 to 4.27.2

Just trying to update my project to use 4.27.2. I downloaded the editor version and tried to open my project with it. It showed a popup asking me to rebuild binaries, when I said yes, it said there was errors and I have to rebuild myself from source.

Went into Rider, tried to build, I got a bunch of errors about missing precompiled flags. The only way I was able to build is to include those flags in my Build.cs

  ApexDefs.h(54): [C4668] 'USE_RTTI' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  ApexDefs.h(54): [C4668] 'USE_RTTI' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  ApexDefs.h(54): [C4668] 'USE_RTTI' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  ApexDefs.h(54): [C4668] 'USE_RTTI' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  ApexDefs.h(54): [C4668] 'USE_RTTI' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  Platform.h(1085): [C4005] see previous definition of 'TEXT'
  winioctl.h(10229): [C4668] '_WIN32_WINNT_WIN10_TH2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10235): [C4668] '_WIN32_WINNT_WIN10_RS1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10240): [C4668] '_WIN32_WINNT_WIN10_TH2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10244): [C4668] '_WIN32_WINNT_WIN10_TH2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10251): [C4668] '_WIN32_WINNT_WIN10_RS2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10261): [C4668] '_WIN32_WINNT_WIN10_RS2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10265): [C4668] '_WIN32_WINNT_WIN10_TH2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10270): [C4668] '_WIN32_WINNT_WIN10_RS3' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10277): [C4668] '_WIN32_WINNT_WIN10_RS4' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10280): [C4668] '_WIN32_WINNT_WIN10_RS1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10283): [C4668] '_WIN32_WINNT_WIN10_RS4' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10288): [C4668] '_WIN32_WINNT_WIN10_RS1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10291): [C4668] '_WIN32_WINNT_WIN10_RS5' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10486): [C4668] '_WIN32_WINNT_WIN10_RS2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(10510): [C4668] '_WIN32_WINNT_WIN10_RS5' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(13950): [C4668] '_WIN32_WINNT_WIN10_RS5' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15111): [C4668] '_WIN32_WINNT_WIN10_RS3' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15128): [C4668] '_WIN32_WINNT_WIN10_RS3' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15147): [C4668] '_WIN32_WINNT_WIN10_RS2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15266): [C4668] '_WIN32_WINNT_WIN10_RS3' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15416): [C4668] '_WIN32_WINNT_WIN10_RS4' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15429): [C4668] '_WIN32_WINNT_WIN10_RS4' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  winioctl.h(15657): [C4668] '_WIN32_WINNT_WIN10_RS1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
  Microsoft.MakeFile.targets(45, 5): [MSB3073] The command "I:\UnrealEngine\UE_4.27\Engine\Build\BatchFiles\Build.bat IOUEditor Win64 Development -Project="I:\UnrealProjects\IOU\IOU\IOU.uproject" -WaitMutex -FromMsBuild" exited with code 6.

I do not have any “Windows.h” includes or any direct standard library headers like some of the other posts mentioned. I merely just upgraded to 4.27.2. I Tried deleting Binaries, Intermediate, Regenerating Project Files, to no avail.

Project was building just fine with 4.26.2. Why is this happening now? Why do I need to add those flags now? How do I properly fix this?

Thanks!

My guess from reading the error messages would be that 4.27 moved to a newer version of the Windows SDK by default (and maybe also a newer version of Visual Studio) and thus you might need to update your VS/WinSDK version to match.

Just tried updating VS2019 to the latest via the VS Installer (assuming that’s what you meant?). No dice. Not sure how to update the WinSDK?

There’s a SDK version selector in the VS installer if I remember correctly.

This: how to update windows sdk in visual studio - Google Search

Leads to this: How to: Use the Windows SDK in a Windows Desktop application | Microsoft Docs

If that doesn’t help, then I have no idea what could be going wrong! Maybe turn on debug output to show what’s being included from where, and figure out what’s going wrong in what order from that? One of the more annoying parts of being a C++ developer is tracing these things down :frowning:
(But it’s still better than npm module version requirement mismatches…)

So I just installed like 8 gigs of SDKs and other nonesense, which none of them worked.

Then I decided to go through file by file in my project looking for weird header includes.

I found the following headers included in random files… <Actor.h> <d3d12sdklayers.h> <corecrt_startup.h>. Removing all those worked.

I have no idea how they got there. Must have been Rider’s auto-including header while I was typing something. Initially I only searched for #include “Actor.h”, didn’t think to search “#include <Actor.h>” with angle brackets.

FFS… Lol.

Thanks for your help!