Developer Notes

See Answerhub for details


A user adds 3 .h files though Visual studio where the first contains a struct, the 2nd includes the 1st, the 3rd includes the 2nd and tries to make a variable of the struct declared in the 1st. The problem emerges when the 2nd file that is bridging the gap isn't reflected (Doesn't have a #include .generated.h), the user is given an error saying that the file type isn't recognized in the 3rd file.

Please note: 4.9 Preview 1 was the only 4.9 build tested. 4.9 was chosen as 4.9 Preview is not a selection at the moment.

Steps to Reproduce

1. Download the attached zip file and unzip the contents
2. Create a new blank C++ project
3. Place the contents of the zip file in the project's Source > Project Name folder
4. Right click the project's .uproject file and select 'Generate Project Files'
5. After the project files are generated, open the .sln file
6. Compile the project (ctrl+shift+b)
Result: The following output is given as an error: "Unrecognized type 'FTheType' - type must be a UCLASS, USTRUCT or UENUM"

Expected: See following steps to get expected result
1. Navigate to the 'TheContainer.h' file in the solution and remove the '//' from '//#include "TheReflectedIntermediate.h"'
2. Comment out (preface with '//') line #5 '#include "TheIntermediate.h"'
3. Compile the project (ctrl+shift+b)
Expected result: The project compiles without issue

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

Login to Vote

Won't Fix
ComponentUE - Foundation - Core
Affects Versions4.8.24.9
Target Fix4.9
CreatedJul 28, 2015
ResolvedJul 29, 2015
UpdatedFeb 5, 2017