Could not be compiled. Try rebuilding from source manually

The issue started when I attempted to create a new .cpp class and it didn’t appear on the content browser, so i went to the file explorer deleted the cpp and header file that was not appearing and proceeded to delete the binaries folder. Afterwards, I launched the engine and was asked to rebuild (an unexpected result).


I then click yes and this error message pops up.


While the project is building I’ve attempted to see the logs but it’s to quick and automatically closes so I cant report anything further.

I’ve attempted multiple similar solutions such as

  1. Delete the following folders: Binaries, Build, Intermediate, Saved and rebuilding
  2. Making sure that I have the Win8.1 SDK
  3. UE 4.18 - Failed to load · Issue #49 · UE4-OceanProject/OceanProject · GitHub (although I think I did not do this solution correctly since I didn’t understand how to do it).

I’ve also been using the same engine version throughout the development phase.

Open the project in Visual Studio (I assume you have this installed as you were adding cpp files) and build it from there. Any compilation errors will be reported, so you can then fix the issues which is preventing it from building.

Alternately you can look in the logs to see what is causing the error. See: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

You could also try right clicking the uproject file in the File Explorer and choosing to Generate Visual Studio project files. Just deleting the cpp & h files will mean that your visual studio solution still expects to see them, and will of course throw an error when it can’t find those files (because they have been deleted).