UnrealEd is editor only. So when you compile it’s elements would be stripped out during the compile process.
Perhaps you can add editor conditions to not make the compiler go crazy
#if WITH_EDITOR
// editor code that uses unrealed module here
#endif
#if WITH_EDITORONLY_DATA
Same thing with including UnrealEd.h => it should also be encompassed by conditional WITH_EDITORONLY_DATA