Error upon creating a new c++ project

Ah yes, I know this issue. Happens to me all the time.

  1. Close your UE Editor
  2. Open your MyCharacter1.cpp file in the IDE you use (if you are not using Rider, consider doing so).
  3. At the top, you will probably see that import is messed up. It will be something like:
    #include "Some_path/MyCharacter1.h", remove Some_path if your .h and .cpp files are in the same directory, and compile should start working.

If they are in a different directory, just make sure you use proper directory tree in the include. And all should start working for you.

Please give us the screenshot of the file tree where CPP and H file are located if you are unable to resolve it. And give us the proper log stack so that we can help.

1 Like