Windows.h error in new C++ project
I've spent more than 15 hours over the course of two days trying to fix this error. Whenever I create a new project the build fails and gives the following errors, all related to windows.h:
Again, this happens in a completely fresh UE4 project. I've never used UE4 before and I want to get started, but this has stumped me completely. I have read every thread about this I could find and I still don't know how to fix it. Here's additional information:
I'm at rope's end, any help would be greatly appreciated.
Yes!!! It worked. Boy, that was a goddamn adventure. And not the good kind.
Thank you so much for the response and your suggestion Matthew. It's hard to tell if moving VS2015 to C:\ is what fixed it or the fact that I did the most rigorous uninstalling ever known to man. I broke my VS2015 twice in the process of figuring out how to properly uninstall it, so if anyone commits to doing this, be prepared for possible trouble.
After you install VS2015 in one place, it is not enough to simply uninstall it. It won't let you choose a different path the next time you install it. You need to do much more to be able to move it. Uninstalling it inadequately and installing it in a different place lead to multiple components breaking and giving errors when VS2015 was opened. Whether or not moving it helped, doing all of this probably solved whatever dependency hell was going on. This is an approximate retelling of what I did that worked, properly uninstalling VS2015 can be pretty convoluted.
Here's what you need:
I'm not sure which steps exactly need a restart but I am pretty sure that restarting after uninstalling is mandatory. I also did a bunch of Windows updates that may or may not have fixed something related to this bug.
After installing, VS2015 might fail to install certain components. If you try running VS2015 without them and it doesn't work then it's worth a shot to just run the installer again after restarting. If that doesn't work try renaming C:\ProgramData\Package Cache\ Don't outright delete it without backing it up because in some rare situations it might cause problems. After deleting it, try running in the installer again. The installer apparently has problems with partially downloaded things and gets stuck or something? I don't know.
Thank you for all of the information, that lets us bypass a lot of questioning. The first thing I noticed is that your environment variables are pointing towards your Visual Studio installation being on your D:\ drive while it seems that your Windows installation is on your C:\ drive. This has caused problems in the past and is likely the cause for this issue. Visual Studio uses multiple things from the System32 folder so having it on a separate drive from your Windows installation can be problematic.
Would it be possible for you to try moving the installation over to your C:\ drive to see if that will work correctly?
answered Oct 03 '16 at 01:59 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here