Can't make c++ file when Inherit button

when I create c++ file in ue4Editor, parent with Button widget.
Error occur.

I can create c++ files but can’t do hot reload.

log is here

Showing All Issues [1/1] Link
UE4Editor-Docan.dylib Undefined
symbols for architecture x86_64:
“vtable for FButtonStyle”, referenced
from: FButtonStyle::~FButtonStyle() in
StretchButton.gen.cpp.o NOTE: a
missing vtable usually means the first
non-inline virtual member function has
no definition. ld: symbol(s) not found
for architecture x86_64 clang: error:
linker command failed with exit code 1
(use -v to see invocation)

I try another project to make c++ file inherited Button Class occur same error.

Is there bug?

Go into your “YourProject.Build.cs” file and add “Slate”,“SlateCore” to your Dependencys. Make sure to #include the correct files in your new class.

Here some usefull link if you do UI Stuff in C++

Cheers

Thank you I can compile my button’s c++ file!
But I think it should compile when add c++ files in ue4Editor.
Anyway thank you very much.

THX a lot ,it works well, i have found a lot of answers, yours is the best.