ProjectName.h.pch is not a valid precompiled header

Whenever I try to build my project for 64-bit or launch I get this error:

D:\Documents\Unreal Projects\MegaRisk\Source\MegaRisk\Online\MegaRiskGameSession.cpp: fatal error C1852: 'D:\Documents\Unreal Projects\MegaRisk\Intermediate\Build\Win64\MegaRisk\Development\MegaRisk\MegaRisk.h.pch' is not a valid precompiled header file

I can package for 32-bit just fine, but anything else and I get this. It happens for every single source file in my project.

Also, the executable I get form 32-bit packaging will only show a black screen when run.

bump please

Bump…

Can I get a bump?

Hello? Anyone?

Just had it as well in 4.18.1. I was trying to solve this problem: Object finder: cannot convert 'UStaticMesh ' to 'UObject ' - Programming & Scripting - Unreal Engine Forums and after outcommenting the problematic parts the compiler threw this one instead… I highly suspect a UE4 bug.

I solved (this particular problem) by deleting the Binary and Intermediate folders and regenerating the Visual Studio files. Of course I risk other random compiler errors but it solved this one.

4.18 is the most unstable release for me personally since 4.7. I’m considering downgrading.

1 Like