Getting error C2855: inconsistent with precompiled header during compiling

As of this week, my project that was compiling just fine the week before, is now unable to compile with me getting various “inconsistent with precompiled header” errors. I got like 178 of these errors:

Error	C2855	command-line option '/source-charset' inconsistent with precompiled header	UE4	E:\Game Development\Unreal4\Source\UnrealEngine 4.13.0\Engine\Plugins\Runtime\GoogleVR\GoogleVRHMD\Intermediate\Build\Win64\UE4Editor\Development\GoogleVRHMD\Module.GoogleVRHMD.cpp	1	

I did some digging around and came upon this answer: Build Failed with VS 2015 update 3 - Programming & Scripting - Unreal Engine Forums

However, not only am I using a version that should have had that problem remedied (4.13), I also do not have Update 3 installed in VS2015. I have never installed any additional updates for VS2015, so the update is not the root cause of this error I think.

Hello cridia,

This message leads me to believe that this is related to the Google VR plugin. Can you try disabling that (even if it is what you plan to create your project for) to see if the issue persists? Also, can you try deleting your intermediates/binaries folder, regenerating project files, and then building?

Unfortunately, that didn’t work. While the errors did decrease from 178 to 140, the nature of the errors remain the same; still a giant C2855 circus.

I should also note that the google VR error above is just an example. I forgot to mention that the 178 errors I got were all C2855 errors, and the errors pretty much encompass the entire engine (to name just a few; Twitch Live Streaming, Steam, Structbox, AnalyticsBlueprintLibrary, etcetera, etcetera). I decided not to post the entire thing because it was quickly becoming huge (with a character count somewhere in the 30.000-40.000).

I decided that fighting around with the errors wasn’t worth my while and updated to 4.14. The errors have disappeared now and I can properly compile and run the project.

edit: I noticed that I didn’t properly reply to this with my previous reply. Just wanted to let you know that I did try out your advice, but was unsuccessful.