I wanted to add a simple C++ class to my blueprint based project, but when it auto compiled in the editor it threw an error and told me to rebuild the module. If I try to build manually from source I’m getting the following error: “SharedPCH.Engine.h.pch”: No such file or directory
What I tried:
Set the PCHUsage to no pch and even specified my own header file for this purpose, but then it’s just giving the same error with a different filename.
I cannot disable header precompiling in VS since there is no freakin option in the configuration settings.
I deleted the Intermediate and Saved folder and I also made sure to clean the project and rebuild (also with admin privileges)
I’m on VS 2019 and set the accessor in the config to exactly that. I do have installed the UE4 installer integration, C++ game dev tools and the windows 10 SDK.
I moved my project directory outside of my OneDrive folder into my documents folder (Unreal Projects). Could a long path length be causing such an issue?
Well no, I’m not really able to use git as I’m developing from different devices and my project already’s got a size of more than 20GB. Uploading that to git is not really funny.
Second, I did put that expression into my build file and I also rebuilt my project. But it did not generate the precompiled header.
Most likely if you use buildconfiguration.xml it is not set to generate precompiled header, or it could be that your project does not comply with IWYU:
I also solved the error by moving the proyect to another route, in my case I think it was because in the route it appears my name, which contains a non-ASCII character. So I think if you have an non ASCII character the compiler can’t find the file.