Cant compile to save my life / GENERATED_BODY() stops compiling

I had the same problem. After some head scratching I soon realized it was because I had added the files in “the wrong way”.

As mentioned adding the file from the wizard fixed the problem, provided that you select an object type that uses the .generated.h files such as Actor or UObject. Adding an Empty C++ class from the option will result in this error which is a bit deceiving if you’re mainly planning on adding a definition file with enums or structs exposed to Blueprint.