Another possibility, especially if you encounter both Error C4430 and C2039 together like that :
MyClass.h(41): Error C4430 : missing type specifier - int assumed. Note: C++ does not support default-int
MyClass.gen.cpp(83): Error C2039 : 'StaticStruct': is not a member of 'FSomething'
MyClass.h(39): Reference : see declaration of 'FSomething'
Check if you’re including the generated.h file !
#include "MyClass.generated.h"
Most of the time, your IDE will write this line for you so you won’t encounter this problem, but sometimes you switch from pure C++ to Unreal C++, and tends to forget this kind of things (and it’s pain to find the answer you need in those situations).
(I’m reviving this thread because it’s the first google result when looking for this problem)