x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

"Generate Visual Studio Project Files" did not auto-generate generated.h header files

Branch: Binary, from Launcher
Version: 4.7.3
System Specs: Alienware 13, Nvidia Geforce 860M, Windows 8.1

alt text

While I was editing my code and building them, I got errors saying:

 Error    1    error code: OtherCompilationError (2)    C:\Users\tom_m_000\Documents\Unreal Projects\get-debt\Intermediate\ProjectFiles\Error    GetDebt

And the output window says:

 GetDebt/Objects/GetDebtWheelRear.h(16) : Expected an include at the top of the header: '#include "GetDebtWheelRear.generated.h"'

There is no "generated.h" header files in the project, as far as I can tell. I expected the "Generate Visual Studio Project files" option to actually generate everything, including "generated.h" header files the project needs.

But the actual result, as shown in the GIF above, shows otherwise. Hence the bug report.

Does anyone know how to fix this issue where the "generated.h" header files are missing from the project?

Product Version: Not Selected
Tags:
more ▼

asked Mar 25 '15 at 10:16 PM in Bug Reports

avatar image

asperatology
223 22 25 80

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Does anyone know how to fix this issue where the "generated.h" header files are missing from the project?

Ok, I answered my own question.

To fix this:

  1. Open "Binaries" folder in the project root folder.

  2. Delete the folder in there.

  3. Re-arrange the source codes if you are re-organizing the file structures.

  4. "Generate Visual Studio project files" by right-clicking the UPROJECT file and selecting the option.

  5. Double click on the UPROJECT file.

  6. Open Unreal Engine 4 Editor to check to make sure the instanced code classes are re-organized to the way you wanted.

It is an issue, and the feature request has been made. Thread link here.

more ▼

answered Mar 25 '15 at 10:58 PM

avatar image

asperatology
223 22 25 80

avatar image salkuma May 15 '15 at 01:40 AM

It also works when a new module is not exposed on the editor. I had tried add a new module into my project, but I got NewModuleHeader.generated.h.conflict file on [ProjectName]\Intermediate\Build\Win64\UE4Editor\Inc[NewModuleName] folder. I spent a few hours to find a solution, then I followed above instruction, magic! it works. My editor showed up new modules I had added. Thanks @asperatology

avatar image Aericks Oct 05 '16 at 05:45 AM

I know that this post is fairly old, but in the future when someone (ie myself) runs into a problem at step 5 not able to open up, and therefore unable to generate code, there is another error in your code, and the compiler will NOT find it, because it will crash while searching for generated .h files.

I spent about an hour on this before realizing that I had a syntax error on the file I was previously working on before I had to generate the files.

avatar image Midsoft Inc. Jul 27 '17 at 07:10 PM

Oh, so you have deleted the folder in the Binaries for UE4 to request a rebuild. (Right?)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Sometimes if you do not see any errors I find the best solution is to not rely on the unreal engine IDE but load up your c/c++ IDE like in visual studio and rebuild whole project there.

Reason being if you migrate from one version of engine to another the API often changes since the unreal engine now follow the same rule as game engine as a service.

even its labeled 4.x it will be constantly changing and even major releases where before if was following Major.Revision.Minor it would be in version 18.x by now lol

more ▼

answered Aug 10 '17 at 12:29 AM

avatar image

dazzlesoftware
5 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question