I am trying to port a project from 4.14 to 4.16 and faced strange build errors. So I tried to build other projects and I found out I can’t compile any of the engine’s c++ templates (third person c++/first person/flying etc.)
with PCH (PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs) I get these 2 errors :
error C2855: command-line option '/Z7' inconsistent with precompiled header error C2859: ...\SharedPCH.UnrealEd.h.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
With no PCH (PCHUsage = PCHUsageMode.NoSharedPCHs) I get this:
All source files in module "ModuleName" must include the same precompiled header first. Currently "D:\Unreal Projects\ModuleName\Source\ModuleName\ModuleName.h" is included by most of the source files. The following source files are not including "D:\Unreal Projects\ModuleName\Source\ModuleName\ModuleName.h" as their first include :
I get these same errors from all templates with no modifications.
Other projects compile fine in 4.14.
Using vanilla build of the engine. Both VS2015 and VS2017 generate the same errors.
Any idea what’s causing this ?