# Compile error with source code 4.21 and 4.22.1-release

**URL:** <https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370>\
**Category:** C++\
**Tags:** engine-compile, UE4-21, unreal-engine, CPP, question, compilation-log\
**Created:** [May 4, 2019, 12:09pm UTC](https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370 "2019-05-04T12:09:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leaf9072](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leaf9072](https://forums.unrealengine.com/u/leaf9072)\
**Post date:** [May 4, 2019, 12:09pm UTC](https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370/1 "2019-05-04T12:09:17Z")

</div>

Compiling source code fails,Here‘re the info I collected,(VS2017)  
  
[1/37] Module.Sockets.cpp  
  
2\>D:\Windows  
Kits\10\include\10.0.18362.0\shared\ndis/version.h(7):  
error C4668:  
‘NDIS\_MINIPORT\_MAJOR\_VERSION’ is not  
defined as a preprocessor macro,  
replacing with ‘0’ for ‘#if/#elif’  
  
[2/37] Module.Icmp.cpp  
  
2\>D:\Windows  
Kits\10\include\10.0.18362.0\shared\ndis/version.h(7):  
error C4668:  
‘NDIS\_MINIPORT\_MAJOR\_VERSION’ is not  
defined as a preprocessor macro,  
replacing with ‘0’ for ‘#if/#elif’  
  
2\>UnrealBuildTool : error : UBT  
  
ERROR: Failed to produce item:  
  
F:\UnrealEngine421\Engine\Intermediate\Build\Win64\UE4Editor\Development\Sockets\UE4Editor-Sockets.lib  
2\> (see  
…/Programs/UnrealBuildTool/Log.txt  
for full exception trace)  
  
2\>Total build time: 70.19 seconds (Parallel executor: 0.00 seconds)  
  
2\>D:\Microsoft Visual Studio  
2017\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5):  
error MSB3075: The command  
“…..\Build\BatchFiles\Build.bat  
UE4Editor Win64 Development  
-WaitMutex -FromMsBuild -2017” exited with code 5. Please verify  
that you have sufficient rights to  
run this command.  
  
2\>Done building project “UE4.vcxproj” – FAILED.  
  
  
Here is the UnrealBuildTool log  
  
how to solve this,any suggestion, Thank you in advance。

---

<div class="post-metadata">

**Author:** ![leaf9072](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leaf9072](https://forums.unrealengine.com/u/leaf9072)\
**Post date:** [May 5, 2019, 11:34am UTC](https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370/2 "2019-05-05T11:34:44Z")

</div>

Solve the first one : error C4668,remove or comment the 10.0.18362.0 folder

![276045-img2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/3/7d3771aa7c2db54c66458070c16d2c50494659a5.png)

![276046-img1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/3/9036d26f9c428dbecb263e222b7d223e7a77dfc1.png)

  
I didn't install version 10.0.18362.0,  
Solve the second one : error MSB3075, run the project with administrator privileges.

---

<div class="post-metadata">

**Author:** ![bhvr.kab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bhvr.kab](https://forums.unrealengine.com/u/bhvr.kab)\
**Post date:** [June 25, 2019, 7:48pm UTC](https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370/3 "2019-06-25T19:48:00Z")

</div>

Any update on this? I need that Windows SDK version for my project

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_89488762](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_89488762](https://forums.unrealengine.com/u/anonymous_user_89488762)\
**Post date:** [July 17, 2019, 5:53pm UTC](https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370/4 "2019-07-17T17:53:47Z")

</div>

That solution seems to working but it seems the generated project is missing some definitions or Windows SDK (10.0.18362.0) doesn’t set a default NDIS###\_MINIPORT version to use.

Here are some posts related to the issue:

[https://stackoverflow.com/questions/34331918/how-to-port-ndis-6-2-to-ndis-6-3-using-ndis-support-ndis630](https://stackoverflow.com/questions/34331918/how-to-port-ndis-6-2-to-ndis-6-3-using-ndis-support-ndis630)

^ On the link above for the accepted answer please notice that one of the responses states simply adding the proper definition on the project:

```
    NDIS620_MINIPORT=1

```

[https://docs.microsoft.com/en-us/windows-hardware/drivers/network/compiling-an-ndis-6-30-driver](https://docs.microsoft.com/en-us/windows-hardware/drivers/network/compiling-an-ndis-6-30-driver)

Or remove all installed Windows SDK versions and only install 10.0.17763.0

---

<div class="post-metadata">

**Author:** ![bhvr.kab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bhvr.kab](https://forums.unrealengine.com/u/bhvr.kab)\
**Post date:** [July 17, 2019, 5:56pm UTC](https://forums.unrealengine.com/t/compile-error-with-source-code-4-21-and-4-22-1-release/448370/5 "2019-07-17T17:56:34Z")

</div>

Removing Windows SDK 10.0.18362 is not a possibility for my requirements. Adding definitions to UBT seems to be the best approach for now
