After upgrading to Unreal Engine 5.6, some developers in our project intermittently encounter the following compilation error:
obj : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
This error occurs across different plugins and modules, requiring manual deletion of corrupted obj files each time it appears, which is highly disruptive.
We would like to ask:
What is the root cause of this error?
What are the recommended solutions to prevent it?
Additionally, we suspect potential correlations with:
Use of newer Visual C++ toolchains (14.44+)
Enabling Visual Studio’s new Dynamic Debugging feature
Integration of UBA (Unreal Build Accelerator)
Could you clarify if these factors contribute to the issue?
As this started happening after an engine version and toolchain update, there are high chances that is it caused by compilation artifacts from the previous setup in the Intermediate folders of the Engine and plugins. It could also be caused by leftovers from deleted or renamed code files.
It is highly recommended to clean all targets following an engine version or a toolchain update to avoid this kind of problems. You can either use the ‘Clean’ command from the Visual Studio solution or delete the Intermediate folder of the Engine (which triggers a full rebuild).
You mentioned using the 14.44 toolchain but the recommend version for 5.6 is 14.38. I highly recommend that you install the recommended version to avoid problems related to the newer toolchain(s). The older toolchain can be installed manually from the VS Installer or by following the helper tool that you should have at the top of the Solution Explorer. This last one will result in installing all recommended packages. They are specified in Engine\Config\Windows\Windows_SDK.json