#UE5.0
when i try to compile in ue5, i find 3 main error about “SharedPCH.Engine.ShadowErrors.h.obj.”
- Failed to move file “SharedPCH.Engine.ShadowErrors.h.obj.”
- Cannot open file “SharedPCH.Engine.ShadowErrors.h.obj.”
3.Failed to link Pathch
#UE5.0
when i try to compile in ue5, i find 3 main error about “SharedPCH.Engine.ShadowErrors.h.obj.”
It sounds like something preventing access to files/folder, do you have anything of that sort ? an anti virus can also do that.
Check this response from another post it could be related to this.
probably have a stuck cl.exe process. Check in Task Manager to see if you’ve got any cl.exe processes running when you aren’t building, and if so kill them.
Could be some other process too
SOLVE:
The causes are many, but two I have tracked are missing config files from an incorrect .gitignore/.p4exclude or changing the IDE.
VS or Rider
BUMP: Anyone else getting these errors?
It has shown up for me a few times since moving to UE5.
Files are not read-only; this happens after a clean reboot of the machine, so nothing is locked.
Making a new project from scratch and migrating is the only workaround, but time-consuming…
either the files are read-only or something has them locked. Unless your drive is failing, those are pretty much the two options. Might want to check with something like File Unlocker, or i think Windows PowerToys has a tool to see what’s got a lock on things…
I would not recommend removing the Source directory. It includes the ‘target’ files that are necessary for compiling.
I am also having problems with this on Lyra tho . May try making a new project
delete binaries folder,and recompile
Thank you! This resolved the following error for me: LINK : fatal error LNK1181: cannot open input file... Failed to link patch (0.000s) (Exit code: 0x49D)... Failed to move file from <C:\path\SharedPCH.Engine.ShadowErrors.h.lc.obj>. Error: 0x2
.
none of the recomendation helped me. but this - Lyra Starter Game, UE 5.0.1, VS 2019, Immediate compile errors - #8 by jwatte worked for me.
Thanks! It works for me! By the way, the folders I deleted is Binaries and DerivedDataCache. I should not delete the Source folder because the whole project is based on the source folder. I met the problem when I try to change some source codes in the Lyra project( codes in the LyraGame module). But there is still a little problem that I have to use the live coding to compile the project, and I have to do nothing but wait for it to finish compiling the code. If I do anything else(even open a web! ), the unreal editor will crash again. Any way, it is better than restarting the editor when I want to change some codes.
Thanks again !