{"id":2938,"date":"2022-04-20T17:20:39","date_gmt":"2022-04-20T15:20:39","guid":{"rendered":"https:\/\/store.algosyntax.com\/?post_type=asx-lms-tutorial-cpt&#038;p=2938"},"modified":"2026-03-09T06:12:49","modified_gmt":"2026-03-09T04:12:49","slug":"ue5-expected-an-include-at-the-top-of-the-header-generated-h","status":"publish","type":"asx-lms-tutorial-cpt","link":"https:\/\/store.algosyntax.com\/tutorials\/unreal-engine\/ue5-expected-an-include-at-the-top-of-the-header-generated-h\/","title":{"rendered":"UE5 Expected an include at the top of the header generated.h"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2938\" class=\"elementor elementor-2938\" data-elementor-post-type=\"asx-lms-tutorial-cpt\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-500b4ca elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"500b4ca\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ff892eb\" data-id=\"ff892eb\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bf2cdad elementor-widget elementor-widget-global elementor-global-3247 elementor-widget-theme-post-featured-image\" data-id=\"bf2cdad\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"theme-post-featured-image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"809\" height=\"300\" src=\"https:\/\/store.algosyntax.com\/wp-content\/uploads\/tutorials\/unreal-engine\/unreal-build-tool\/ue5-expected-an-include-at-the-top-error.png\" class=\"attachment-full size-full wp-image-2939\" alt=\"UE5 expected an include at the top error\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-294ca66 elementor-widget elementor-widget-text-editor\" data-id=\"294ca66\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>How to fix Unreal Engine Error: Expected an include at the top of the header: &#8216;#include &#8220;XXX.generated.h&#8221;. This is an error thrown by <a href=\"https:\/\/docs.unrealengine.com\/4.27\/en-US\/ProductionPipelines\/BuildTools\/UnrealBuildTool\/\" target=\"_blank\" rel=\"noopener\">Unreal Build Tool<\/a> when the developer has either not written the &#8216;include..&#8217; line or there are spelling mistakes. Follow these steps to solve it.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6f2490c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6f2490c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c51c928\" data-id=\"c51c928\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-02751f5 elementor-widget elementor-widget-heading\" data-id=\"02751f5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Summarised Solution<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e4bd164 elementor-widget elementor-widget-text-editor\" data-id=\"e4bd164\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ol><li><p><strong>\u00a0Ensure the &#8216;#include&#8230; generated.h&#8217; line is the last of all includes.<\/strong> <br \/>The line &#8220;#include xxxx.generated.h&#8221; has to be in your header file and the last of all includes.<\/p><p>\u00a0<\/p><\/li><li><strong>Ensure the file name of the header and the suggested generated.h match.\u00a0<\/strong> <br \/><br \/>In the line &#8220;#include xxxx.generated.h&#8221; ; xxxx has to match your header file name.eg Actor.h needs Actor.generated.h<br \/>Resharper sometimes changes the file name when refactoring.<br \/><br \/><\/li><li><div class=\"uael-howto-steps-title\">Next Delete Intermidiate folder and regenerate project files.<\/div><div class=\"uael-howto-steps-desc\">Delete the Binaries and Intermediate Folders and Regenerate project files from the uproject.<\/div><\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":2939,"template":"","asx-lms-tutorial-categories":[48,45],"asx-lms-tutorial-tags":[51,54],"class_list":["post-2938","asx-lms-tutorial-cpt","type-asx-lms-tutorial-cpt","status-publish","has-post-thumbnail","hentry","asx-lms-tutorial-categories-unreal-build-tool","asx-lms-tutorial-categories-unreal-engine","asx-lms-tutorial-tags-errors","asx-lms-tutorial-tags-visual-studio","entry","has-media"],"acf":[],"_links":{"self":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/2938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt"}],"about":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/types\/asx-lms-tutorial-cpt"}],"version-history":[{"count":0,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/2938\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media\/2939"}],"wp:attachment":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media?parent=2938"}],"wp:term":[{"taxonomy":"asx-lms-tutorial-categories","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-categories?post=2938"},{"taxonomy":"asx-lms-tutorial-tags","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-tags?post=2938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}