Problem compiling plugin (Win SDK conflict)

Hello,

I’m new to Unreal Engine and are just starting out trying to learn the engine. I’ve created a project and are trying to add some code I have lying around as a plugin. I’m trying to follow the guide here so I’ve created a new plugin through the plugin browser. I have added paths to my code and lib files etc and the plugin itself seem to compile just fine.

It’s when I’m trying to include files from the plugin in the actual project I’m running into problems though. There seem to be some kind of conflict with the Windows SDK as seen below.


1>C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
tverp.h(119): error C4668: 'DBG' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
1>C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
tverp.h(126): error C4668: 'BETA' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
1>C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
tverp.h(132): error C4668: 'OFFICIAL_BUILD' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

Any tips on how to solve the issue would be much appreciated.

I’m using Unreal Engine 4.24.2 and Visual Studio 2019. And since my older code is using c++17 and newer features I’ve modified the Unreal Build System as can be seen here.