Lots of C2065 (undeclared identifiers) suddenly

Hello,

Very scary case here.

All was wroking fine, i closed the editor, didn’t change anything in the code, and i can’t compile anymore.

Instead i get a lot of C2065 errors (undeclared identifier) even on very common things like UImage, and in files that i didn’t touch in ages.

Any idea of what i can do ?

Thanks

Cedric

Ok, this is pure magic.

I had to add a few includes like:

#include "UMG.h" 

and

#include "Runtime/Online/HTTP/Public/Interfaces/IHttpRequest.h"

in a few files (old code that i hadn’t even opened for months) just to recognize common things like UImage and FHttpRequestPtr.

Those were never needed and this code has been compiling correctly forever.

I didn’t touch anything, the Build.cs is all good and intact and hadn’t even been opened for a long time.

I just closed the editor after changing the game version in the project settings, and boom, all of a sudden those includes were needed.

Anyone has any idea of what can have happened ?

Thanks

Cedric

1 Like

ok, trying to rethink and recall EXACTLY what i did in detail, i think i remember doing something i never did before.

When opening the project settings to change my game version before a new clean compilation, i usually just click “project settings” and then make my changes.

This time, after opening the project settings, i also displayed “all settings” and changed the game version from here.

I can’t remember whether or not i closed the project settings windows before closing the editor.

Could there be something in the projects settings that could alter the way visual studio looks for includes when compiling ?

Could my projects settings be corrupted somehow ?

Where can i look ?

Thanks

Cedric