C++ code won't compile windows.h

Hi there! This is a problem I can’t solve. Everytime I try to compile Unreal Engine code I get this error:
fatal error RC1015: cannot open include file ‘windows.h’.
And I can’t figure out what is wrong. I have tried to install Windows SDK, re-install Unreal Engine and Visual Studio and so on. It just won’t work. I have checked my environment varibles and those seem to be right. I have no special characters in my windows account name either. I don’t know what to do. Any help is appreciated!
I’m running a windows 7 64-bit machine.

Hey AntiSC2-

Which version of the engine are you working with? Are you getting this error when building the code for a project or building the engine itself? I would check to ensure that there aren’t any special characters in the file path that you’re trying to build to. You may also want to check your antivirus to make sure it isn’t interfering.

Cheers

Thanks for the reply. Im trying to build the engine version 4.6, but the same thing happens when trying to build other projects. It’s not the anti-virus as I have tested it. There are no special characters in the path I’m trying to build too. But there is an ‘&’ in the visual studio path. Is that ok? If not I will have to re-install visual studio and unreal engine.

I fixed it! My visual studio path included an ‘&’ and after re-installing visual studio everything worked!