Compilation error while migration from 4.26.2 to 4.27.0

While moving project to 4.27.0 version I got some complication errors which are not related to project source.

How to fix following issues?

C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10326): error C4668: ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10332): error C4668: ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10337): error C4668: ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10341): error C4668: ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10348): error C4668: ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10358): error C4668: ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10362): error C4668: ‘_WIN32_WINNT_WIN10_TH2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10367): error C4668: ‘_WIN32_WINNT_WIN10_RS3’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10374): error C4668: ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10377): error C4668: ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10380): error C4668: ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10385): error C4668: ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10388): error C4668: ‘_WIN32_WINNT_WIN10_RS5’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10588): error C4668: ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(10612): error C4668: ‘_WIN32_WINNT_WIN10_RS5’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(14093): error C4668: ‘_WIN32_WINNT_WIN10_RS5’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(15406): error C4668: ‘_WIN32_WINNT_WIN10_RS2’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(15525): error C4668: ‘_WIN32_WINNT_WIN10_RS3’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(15675): error C4668: ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(15688): error C4668: ‘_WIN32_WINNT_WIN10_RS4’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h(15916): error C4668: ‘_WIN32_WINNT_WIN10_RS1’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif

Thank you

Resolved by adding following definition:

#define WIN32_LEAN_AND_MEAN

I’m having the same problem, where did you add the #define?

Hi, I added it as “PublicDefinitions.Add(“WIN32_LEAN_AND_MEAN”);” in MyPlugin.Build.cs file. Best of luck!

3 Likes

Yes, that way it works. Thank you : )

1 Like

where did u find that myplugin.build.cs file T^T

Work for me, thank you !