I believe this is caused by the UHT. It was a nightmare for me but thankfully someone was able to catch the issue on the forums.
The issue is if you have a folder structure like I did (I:\Unreal\Project\4.14) where your solution is contained, when you build your solution, the UHT creates #DEFINES with names that start with “4_14”. A DEFINE cannot start with a digit so this causes countless errors.
And since it is behind the scenes because it is generated, it makes you pull your hair out thinking it’s your code.
Please add a check in your build tool and throw in an extra character in front if needed.