Visual Studio and UE4 include note

I’ve been meaning to mention:

In Visual Studio – if you create new files in the Solution Explorer, even if they appear to be in the same directory as your other files they will fail to #include as they aren’t really in the same directory. So when you get:

error C1083: Cannot open include file:

it will be because it’s created the .h or .cpp file in the GameTitle/Intermediate/ProjectFiles directory rather than the GameTitle/Source/GameTitle directory with the others. You can cut and paste the file(s) from one to the other, ‘Remove’ the files from Solution Explorer and then drag and drop the newly placed files from Windows Explorer to GameTitle in Solution Explorer to fix it.
I’m sure there’s some other way this is supposed to be done but I learn by playing and then read the instructions when I get stuck.

lith

Leave a Reply

Your email address will not be published. Required fields are marked *