Getting build error in my engine plugin while building in UE4 editor while packaging the project

I’ve implemented one engine plugin and using it in VR template project. I’ve build UE4.15 code using visual studio 2015. I’m able to build my plugin using visual studio and run this in ue4 editor.
But I could not able to package it as it gives compilation error, error log it attached here. pls help me to solve this issue.

UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\rbhagwat\UnrealEngine4\Engine\Source\Runtime\Core\Public\HAL/ThreadSafeCounter.h(56): error C2039: ‘_InterlockedIncrement’: is not a member of ‘FWindowsPlatformAtomics’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\rbhagwat\UnrealEngine4\Engine\Source\Runtime\Core\Public\Windows/WindowsPlatformAtomics.h(14): note: see declaration of ‘FWindowsPlatformAtomics’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\rbhagwat\UnrealEngine4\Engine\Source\Runtime\Core\Public\HAL/ThreadSafeCounter.h(56): error C2665: ‘_InterlockedIncrement’: none of the 4 overloads could convert all the argument types
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(8844): note: could be ‘unsigned __int64 _InterlockedIncrement(volatile unsigned __int64 *)’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(8833): note: or ‘unsigned long _InterlockedIncrement(volatile unsigned long *)’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(8824): note: or ‘unsigned int _InterlockedIncrement(volatile unsigned int *)’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\intrin.h(259): note: or ‘long _InterlockedIncrement(volatile long *)’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\rbhagwat\UnrealEngine4\Engine\Source\Runtime\Core\Public\HAL/ThreadSafeCounter.h(56): note: while trying to match the argument list ‘(volatile int32 *)’
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\rbhagwat\UnrealEngine4\Engine\Source\Runtime\Core\Public\HAL/ThreadSafeCounter.h(68): error C2039: ‘_InterlockedAdd’: is not a member of 'FWindowsPlatformAtom

pls check update of this issue here

Hello Rahul3349,

After looking over the information provided I have a quick question for you. Could you try compiling the engine using the Development setting and then let me know if you still run into errors?

Above mentioned build errors are resolved by adding below headers in my plugin header file. My plugin is extending UUserWidget, so below headers are required.
#include “Runtime/UMG/Public/UMG.h”
#include “Runtime/UMG/Public/UMGStyle.h”
#include “Runtime/UMG/Public/Slate/SObjectWidget.h”
#include “Runtime/UMG/Public/IUMGModule.h”
#include “Runtime/UMG/Public/Blueprint/UserWidget.h”