Can't compile after creating a new class

Hello there,

Recently I stumbled upon an issue that’s been driving me mad for 2 days. I am running version 5.3 and all worked fine with my project. I suddenly decided that I need a new C++ class. I made one from the editor, just like I’ve done many times in this project and after creating it, suddenly it can’t compile anymore with the following errors:

Apparently the project is suddenly struggling to find default engine classes. When I delete this new class that I create, it compiles normally. I thought that there is something wrong with the class that I’m deriving from (AEnemy) so I decided to derive from AActor. It didn’t have problems when I first tried it but the second try resulted in the very same issue. I am in a state where I just can’t add any more classes. This problem occurred to the same project before 2 weeks with the following scenario: Code compiled successfully with no errors or warnings but LIVECODING broke, I couldn’t link blueprint nodes so I had to build project from visual studio manually. I started building and this issue occurred out of nowhere, leaving me with no options but to restore earlier version of the project… I couldn’t compile it and therefore open it. I tried 100 times to delete intermediate folders and regenerate files manually - no success. I tried making an entirely new project and copying all code and blueprint nodes on it - no success. What could be causing this, I really can’t do anything anymore and I’m feeling desperate. I still haven’t tried to reinstall the engine, but this is the next thing to do, however, I want to hear more opinions before doing this because I somehow feel this won’t fix it. Thanks in advance.

Check if your project is properly set as startup:

Update all latest SDK (windows, MSVC etc…)

The problem appeared to be coming from circular dependencies. If anybody’s having the same issue, make sure the header files are not using any incudes apart from the classes they are inheriting from and the .generated.h files.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.