Aside of includes you need to add dependency modules. UE4 is divided in to modules and with both plugin and game project you create a all module that will be loaded to the engine, and yes that means you in reality always extending engine code, if your code crash entire engine crash.
Becuase of this structure UBT configures compilation in specific way and it needs to know which modules your module will communicate with, you can check which functions, clases etc. are in which module by looking on API refrence:
You can also deduce which module name is in by looking at the header file path, it directory before Public or Classes
Runtime/UMG/Public/Components/Image.h
You add dependency in to build script of you module (*.build.cs file), in there yhou will have this:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
just add modules to the list, remember to seperate them with commas and put names in quotations (simply keep C# validity, it actully more of a code then configuration file)
Aside of UMG module add also Slate and SlateCore, as UMG is just Slate (UE4 UI system) blueprint wrapper and it’s using Slate types, UMG would eventually force you to add those either way.
Without all this you will get linker errors like you getting right now, you get errors related to constructor as linker tries to link your class to it’s parent which is in UMG module.